Skip to content

Commit 0d506af

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

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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-3
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ void OpenContain::addToContain( Object *rider )
346346
addOrRemoveObjFromWorld(rider, false);
347347
}
348348

349-
// ensure our contents are positions correctly.
350-
redeployOccupants();
351-
352349
// trigger an onContaining event for the object that just "ate" something
353350
if( getObject()->getContain() )
354351
{
355352
getObject()->getContain()->onContaining( rider, wasSelected );
356353
}
357354

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

0 commit comments

Comments
 (0)