diff --git a/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp b/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp index 78f6f63984b..45d980a42ea 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp @@ -745,14 +745,11 @@ void GameClient::step() void GameClient::updateHeadless() { - // TheSuperHackers @info helmutbuhler 03/05/2025 - // When we play a replay back in headless mode, we want to skip the update of GameClient - // because it's not necessary for CRC checking. - // But we do reset the particles. The problem is that particles can be generated during - // GameLogic and are only cleaned up during rendering. If we don't clean this up here, - // the particles accumulate and slow things down a lot and can even cause a crash on - // longer replays. - TheParticleSystemManager->reset(); + // TheSuperHackers @info helmutbuhler 03/05/2025 bobtista 02/02/2026 + // Update particles to prevent accumulation in headless mode. Particles are generated + // during GameLogic and only cleaned up during rendering. update() lets particles finish + // their lifecycle naturally instead of abruptly removing them with reset(). + TheParticleSystemManager->update(); } /** ----------------------------------------------------------------------------------------------- diff --git a/Generals/Code/Main/WinMain.cpp b/Generals/Code/Main/WinMain.cpp index 1b502b2d90f..61f8bcae43f 100644 --- a/Generals/Code/Main/WinMain.cpp +++ b/Generals/Code/Main/WinMain.cpp @@ -826,7 +826,9 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, #endif // register windows class and create application window if(!TheGlobalData->m_headless && initializeAppWindows(hInstance, nCmdShow, TheGlobalData->m_windowed) == false) + { return exitcode; + } // save our application instance for future use ApplicationHInstance = hInstance; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp index d59578dff2c..5682dc22699 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp @@ -783,14 +783,11 @@ void GameClient::step() void GameClient::updateHeadless() { - // TheSuperHackers @info helmutbuhler 03/05/2025 - // When we play a replay back in headless mode, we want to skip the update of GameClient - // because it's not necessary for CRC checking. - // But we do reset the particles. The problem is that particles can be generated during - // GameLogic and are only cleaned up during rendering. If we don't clean this up here, - // the particles accumulate and slow things down a lot and can even cause a crash on - // longer replays. - TheParticleSystemManager->reset(); + // TheSuperHackers @info helmutbuhler 03/05/2025 bobtista 02/02/2026 + // Update particles to prevent accumulation in headless mode. Particles are generated + // during GameLogic and only cleaned up during rendering. update() lets particles finish + // their lifecycle naturally instead of abruptly removing them with reset(). + TheParticleSystemManager->update(); } /** ----------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/Main/WinMain.cpp b/GeneralsMD/Code/Main/WinMain.cpp index b1912b97fe9..435d8daf850 100644 --- a/GeneralsMD/Code/Main/WinMain.cpp +++ b/GeneralsMD/Code/Main/WinMain.cpp @@ -873,7 +873,9 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, // register windows class and create application window if(!TheGlobalData->m_headless && initializeAppWindows(hInstance, nCmdShow, TheGlobalData->m_windowed) == false) + { return exitcode; + } // save our application instance for future use ApplicationHInstance = hInstance;