diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index 45a9b880c..9516fbdf2 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -786,16 +786,17 @@ void CElementGen::BuildParticleSystemBounds() { x2f0_systemBounds.accumulateBounds(aabb); } -u32 CElementGen::GetSystemCount() { +u32 CElementGen::GetSystemCount() const { u32 ret = 0; for (const std::unique_ptr& child : x290_activePartChildren) { - if (child->Get4CharId() == FOURCC('PART')) - ret += static_cast(*child).GetSystemCount(); - else + if (child->Get4CharId() == FOURCC('PART')) { + ret += static_cast(*child).GetSystemCount(); + } else { ret += 1; + } } - return (ret + (x25c_activeParticleCount != 0)); + return ret + (x25c_activeParticleCount != 0); } void CElementGen::Render(const CActorLights* actorLights) { diff --git a/Runtime/Particle/CElementGen.hpp b/Runtime/Particle/CElementGen.hpp index f8d2ef3db..2a6595e6d 100644 --- a/Runtime/Particle/CElementGen.hpp +++ b/Runtime/Particle/CElementGen.hpp @@ -180,7 +180,7 @@ public: void UpdateLightParameters(); void BuildParticleSystemBounds(); u32 GetEmitterTime() const { return x74_curFrame; } - u32 GetSystemCount(); + u32 GetSystemCount() const; u32 GetCumulativeParticleCount() const { return x260_cumulativeParticles; } u32 GetParticleCountAllInternal() const; u32 GetParticleCountAll() const { return x264_recursiveParticleCount; }