File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/System
Generals/Code/GameEngine/Source/GameLogic/System Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -293,9 +293,18 @@ Bool GameLogic::isInSinglePlayerGame( void )
293
293
// -------------------------------------------------------------------------------------------------
294
294
void GameLogic::destroyAllObjectsImmediate ()
295
295
{
296
- // destroy all remaining objects
297
296
Object *obj;
298
297
Object *nextObj;
298
+
299
+ // TheSuperHackers @bugfix xezon 22/05/2025 Set all remaining objects effectively dead to avoid triggering their
300
+ // death modules that eventually would spawn new objects, such as debris, which could then crash the game.
301
+ // See https://github.com/TheSuperHackers/GeneralsGameCode/issues/896
302
+ for ( obj = m_objList; obj; obj = obj->getNextObject () )
303
+ {
304
+ obj->setEffectivelyDead (true );
305
+ }
306
+
307
+ // destroy all remaining objects
299
308
for ( obj = m_objList; obj; obj = nextObj )
300
309
{
301
310
nextObj = obj->getNextObject ();
Original file line number Diff line number Diff line change @@ -308,9 +308,18 @@ Bool GameLogic::isInSinglePlayerGame( void )
308
308
// -------------------------------------------------------------------------------------------------
309
309
void GameLogic::destroyAllObjectsImmediate ()
310
310
{
311
- // destroy all remaining objects
312
311
Object *obj;
313
312
Object *nextObj;
313
+
314
+ // TheSuperHackers @bugfix xezon 22/05/2025 Set all remaining objects effectively dead to avoid triggering their
315
+ // death modules that eventually would spawn new objects, such as debris, which could then crash the game.
316
+ // See https://github.com/TheSuperHackers/GeneralsGameCode/issues/896
317
+ for ( obj = m_objList; obj; obj = obj->getNextObject () )
318
+ {
319
+ obj->setEffectivelyDead (true );
320
+ }
321
+
322
+ // destroy all remaining objects
314
323
for ( obj = m_objList; obj; obj = nextObj )
315
324
{
316
325
nextObj = obj->getNextObject ();
You can’t perform that action at this time.
0 commit comments