File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameClient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -783,18 +783,9 @@ void GameClient::step()
783783
784784void GameClient::updateHeadless ()
785785{
786- // TheSuperHackers @info helmutbuhler 03/05/2025
787- // When we play a replay back in headless mode, we want to skip the update of GameClient
788- // because it's not necessary for CRC checking.
789- // But we do update the particles. The problem is that particles can be generated during
790- // GameLogic and are only cleaned up during rendering. If we don't clean this up here,
791- // the particles accumulate and slow things down a lot and can even cause a crash on
792- // longer replays.
793- // TheSuperHackers @fix bobtista 02/02/2026 Use update() instead of reset() to avoid
794- // use-after-free crash. reset() deletes all particle systems immediately, but DrawModules
795- // (W3DTruckDraw, W3DTankDraw, etc.) hold raw pointers to particle systems. When those
796- // DrawModules are later destroyed during game shutdown, they crash accessing freed memory.
797- // update() only cleans up finished particle systems, leaving active ones intact.
786+ // TheSuperHackers @info helmutbuhler 03/05/2025 bobtista 02/02/2026
787+ // Update particles to prevent accumulation in headless mode. update() has slightly more
788+ // CPU overhead than reset() but is semantically correct - particles finish naturally.
798789 TheParticleSystemManager->update ();
799790}
800791
You can’t perform that action at this time.
0 commit comments