Skip to content

Commit faf8a09

Browse files
committed
bugfix: Make healed infantry follow the building rally point
Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
1 parent f58c2fd commit faf8a09

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,19 @@ 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 Move to rally point if present.
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)
130+
{
131+
setRallyPoint(rp);
132+
}
133+
}
134+
#endif
135+
123136
ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj);
124137
if (exitDoor != DOOR_NONE_AVAILABLE)
125138
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)