Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand

Copy building rally so healed infantry follow it

The code is not a literal copy from somewhere.
Suggestion:

Move to rally point if present.

#if !RETAIL_COMPATIBLE_CRC

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove indentation for #if

ExitInterface* buildingExit = getObject()->getObjectExitInterface();
if (buildingExit && buildingExit != static_cast<ExitInterface*>(this))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the self-check needed here?
Are there scenarios where getObject()->getObjectExitInterface() can return the same ExitInterface as the current unit?

{
const Coord3D* rp = buildingExit->getRallyPoint();
if (rp) { setRallyPoint(rp); }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use

if (rp)
    setRallyPoint(rp);
if (rp)
{
    setRallyPoint(rp);
}

for readability

}
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove indentation for #endif


ExitDoorType exitDoor = reserveDoorForExit(obj->getTemplate(), obj);
if (exitDoor != DOOR_NONE_AVAILABLE)
exitObjectViaDoor( obj, exitDoor );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ExitInterface*>(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 );
Expand Down
Loading