Skip to content

Conversation

@tintinhamans
Copy link

Infantry will now follow building rally point after healing.

Closes #221

Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
@tintinhamans tintinhamans added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility labels Nov 7, 2025
// 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 (buildingExit && buildingExit != static_cast<ExitInterface*>(this))
{
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

const Coord3D* rp = buildingExit->getRallyPoint();
if (rp) { setRallyPoint(rp); }
}
#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

if( doneHealing == TRUE )
{
// TheSuperHackers @bugfix arcticdolphin 07/11/2025 Copy building rally so healed infantry follow it
#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

// 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))

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infantry healed in Barracks does not follow Rally Point, but Vehicle repaired in Factory does

2 participants