From 43450eab5ebd540675dd9480e892d61f91281ba5 Mon Sep 17 00:00:00 2001 From: Mauller <26652186+Mauller@users.noreply.github.com> Date: Sun, 30 Aug 2026 17:12:15 +0100 Subject: [PATCH] fix(particlesys): Prevent master particle systems destroying themselves before their slave system (#) --- .../Source/GameClient/System/ParticleSys.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Core/GameEngine/Source/GameClient/System/ParticleSys.cpp b/Core/GameEngine/Source/GameClient/System/ParticleSys.cpp index 561387f7db1..0d697e89fe7 100644 --- a/Core/GameEngine/Source/GameClient/System/ParticleSys.cpp +++ b/Core/GameEngine/Source/GameClient/System/ParticleSys.cpp @@ -2125,9 +2125,15 @@ Bool ParticleSystem::update( Int localPlayerIndex ) // If we have been "destroyed", wait for all of our particles to die off, // then destroy ourselves (return false). // + // TheSuperHackers @bugfix Mauller 30/08/2026 Delay destruction to prevent finite-lifetime slave particle systems being orphaned. + // Orphaned particle systems lack positional data, render at the world origin and do not complete their full lifecycle. if (m_isDestroyed && !m_systemParticlesHead) - return false; + { + if (m_slaveSystem && !m_slaveSystem->isSystemForever()) + return true; + return false; + } // monitor particle system lifetime if (m_isForever == false) @@ -2142,7 +2148,12 @@ Bool ParticleSystem::update( Int localPlayerIndex ) // check if time is up if (m_systemLifetimeLeft == 0) - return false; + { + if (m_slaveSystem && !m_slaveSystem->isSystemForever()) + m_isDestroyed = true; + else + return false; + } } return true;