From 25038720657d95a794e52472016bc8cb2a998193 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 26 Mar 2022 20:23:44 -0400 Subject: [PATCH] Fixes for CElementGen / CExplosion --- Runtime/Particle/CElementGen.cpp | 2 +- Runtime/World/CExplosion.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index d501328ba..66925eae1 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -1215,7 +1215,7 @@ void CElementGen::RenderParticles() { } } - bool hasModuColor = x338_moduColor != zeus::skBlack; // TODO skClear? + bool hasModuColor = x338_moduColor != zeus::skWhite; CGraphics::SetCullMode(ERglCullMode::None); zeus::CTransform systemModelMatrix(CGraphics::g_ViewMatrix); systemModelMatrix.origin.zeroOut(); diff --git a/Runtime/World/CExplosion.cpp b/Runtime/World/CExplosion.cpp index a65747e80..94473a83e 100644 --- a/Runtime/World/CExplosion.cpp +++ b/Runtime/World/CExplosion.cpp @@ -50,9 +50,8 @@ void CExplosion::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CSt } else if (msg == EScriptObjectMessage::Registered) { if (xe8_particleGen->SystemHasLight()) { xec_explosionLight = mgr.AllocateUniqueId(); - mgr.AddObject(new CGameLight(xec_explosionLight, GetAreaIdAlways(), true, "ExplodePLight_" + x10_name, - x34_transform, GetUniqueId(), xe8_particleGen->GetLight(), 1, /*xf0_particleDesc*/ 0, - 0.f)); + mgr.AddObject(new CGameLight(xec_explosionLight, GetAreaIdAlways(), GetActive(), "ExplodePLight_" + x10_name, + x34_transform, GetUniqueId(), xe8_particleGen->GetLight(), 1, 0, 0.f)); } } @@ -111,8 +110,8 @@ void CExplosion::Render(CStateManager& mgr) { return; } - CElementGen::SetSubtractBlend(xf4_24_renderThermalHot); - CGraphics::SetFog(ERglFogMode::PerspLin, 0.f, 74.f, zeus::skBlack); + CElementGen::SetSubtractBlend(!xf4_24_renderThermalHot); + CGraphics::SetFog(ERglFogMode::PerspLin, 0.f, 75.f, zeus::skBlack); xe8_particleGen->Render(); mgr.SetupFogForArea(GetAreaIdAlways()); CElementGen::SetSubtractBlend(false);