diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp index 4885ab2570..3cea62d10d 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp @@ -120,6 +120,16 @@ UpdateSleepTime HealContain::update( void ) // if we're done healing, we need to remove us from the healing container if( doneHealing == TRUE ) { + // TheSuperHackers @bugfix arcticdolphin 07/11/2025 Copy building rally so healed infantry follow it + #if !RETAIL_COMPATIBLE_CRC + ExitInterface* buildingExit = getObject()->getObjectExitInterface(); + if (buildingExit && buildingExit != static_cast(this)) + { + const Coord3D* rp = buildingExit->getRallyPoint(); + if (rp) { setRallyPoint(rp); } + } + #endif + ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj); if (exitDoor != DOOR_NONE_AVAILABLE) exitObjectViaDoor( obj, exitDoor ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp index 6ad5180f88..e09cc4c58f 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/HealContain.cpp @@ -120,6 +120,16 @@ UpdateSleepTime HealContain::update( void ) // if we're done healing, we need to remove us from the healing container if( doneHealing == TRUE ) { + // TheSuperHackers @bugfix arcticdolphin 07/11/2025 Copy building rally so healed infantry follow it + #if !RETAIL_COMPATIBLE_CRC + ExitInterface* buildingExit = getObject()->getObjectExitInterface(); + if (buildingExit && buildingExit != static_cast(this)) + { + const Coord3D* rp = buildingExit->getRallyPoint(); + if (rp) { setRallyPoint(rp); } + } + #endif + ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj); if (exitDoor != DOOR_NONE_AVAILABLE) exitObjectViaDoor( obj, exitDoor );