Skip to content

Commit 610b09f

Browse files
committed
bugfix: Make healed infantry follow the building rally point
Signed-off-by: tintinhamans <[email protected]>
1 parent c5d839e commit 610b09f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ UpdateSleepTime HealContain::update( void )
120120
// if we're done healing, we need to remove us from the healing container
121121
if( doneHealing == TRUE )
122122
{
123+
// TheSuperHackers @bugfix arcticdolphin 07/11/2025 Copy building rally so healed infantry follow it
124+
#if !RETAIL_COMPATIBLE_CRC
125+
ExitInterface* buildingExit = getObject()->getObjectExitInterface();
126+
if (buildingExit && buildingExit != static_cast<ExitInterface*>(this))
127+
{
128+
const Coord3D* rp = buildingExit->getRallyPoint();
129+
if (rp) { setRallyPoint(rp); }
130+
}
131+
#endif
132+
123133
ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj);
124134
if (exitDoor != DOOR_NONE_AVAILABLE)
125135
exitObjectViaDoor( obj, exitDoor );

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ UpdateSleepTime HealContain::update( void )
120120
// if we're done healing, we need to remove us from the healing container
121121
if( doneHealing == TRUE )
122122
{
123+
// TheSuperHackers @bugfix arcticdolphin 07/11/2025 Copy building rally so healed infantry follow it
124+
#if !RETAIL_COMPATIBLE_CRC
125+
ExitInterface* buildingExit = getObject()->getObjectExitInterface();
126+
if (buildingExit && buildingExit != static_cast<ExitInterface*>(this))
127+
{
128+
const Coord3D* rp = buildingExit->getRallyPoint();
129+
if (rp) { setRallyPoint(rp); }
130+
}
131+
#endif
132+
123133
ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj);
124134
if (exitDoor != DOOR_NONE_AVAILABLE)
125135
exitObjectViaDoor( obj, exitDoor );

0 commit comments

Comments
 (0)