Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions Generals/Code/GameEngine/Source/GameClient/GameClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/** -----------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions Generals/Code/Main/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 5 additions & 8 deletions GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/** -----------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/Main/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading