Skip to content

Commit 6ae9eba

Browse files
authored
[GEN][ZH] Reset DrawableID on map load to avoid massive id growth over the lifetime of the game (#657)
1 parent 7c1b1ac commit 6ae9eba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Generals/Code/GameEngine/Source/GameClient/GameClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ void GameClient::reset( void )
457457
// clear any drawable TOC we might have
458458
m_drawableTOC.clear();
459459

460+
// TheSuperHackers @fix Mauller 13/04/2025 Reset the drawable id so it does not keep growing over the lifetime of the game.
461+
m_nextDrawableID = (DrawableID)1;
462+
460463
} // end reset
461464

462465
/** -----------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,9 @@ void GameClient::reset( void )
478478
// clear any drawable TOC we might have
479479
m_drawableTOC.clear();
480480

481+
// TheSuperHackers @fix Mauller 13/04/2025 Reset the drawable id so it does not keep growing over the lifetime of the game.
482+
m_nextDrawableID = (DrawableID)1;
483+
481484
} // end reset
482485

483486
/** -----------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)