Skip to content

Commit 94d6f1a

Browse files
author
Bart Roossien
committed
[GEN][ZH]Fixed garrison points not initialized before first use (#)
1 parent dd2890c commit 94d6f1a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,15 @@ void OpenContain::addToContain( Object *rider )
324324
addOrRemoveObjFromWorld(rider, false);
325325
}
326326

327-
// ensure our contents are positions correctly.
328-
redeployOccupants();
329-
330327
// trigger an onContaining event for the object that just "ate" something
331328
if( getObject()->getContain() )
332329
{
333330
getObject()->getContain()->onContaining( rider );
334331
}
335332

333+
// ensure our contents are positions correctly.
334+
redeployOccupants();
335+
336336
// trigger an onContainedBy event for the object that just got "eaten" by us
337337
rider->onContainedBy( getObject() );
338338

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,16 @@ void OpenContain::addToContain( Object *rider )
346346
addOrRemoveObjFromWorld(rider, false);
347347
}
348348

349-
// ensure our contents are positions correctly.
350-
redeployOccupants();
351349

352350
// trigger an onContaining event for the object that just "ate" something
353351
if( getObject()->getContain() )
354352
{
355353
getObject()->getContain()->onContaining( rider, wasSelected );
356354
}
357355

356+
// ensure our contents are positions correctly.
357+
redeployOccupants();
358+
358359
// trigger an onContainedBy event for the object that just got "eaten" by us
359360
rider->onContainedBy( getObject() );
360361

0 commit comments

Comments
 (0)