-
Notifications
You must be signed in to change notification settings - Fork 117
bugfix: Make healed infantry follow the building rally point #1822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
| // 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 |
There was a problem hiding this comment.
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); } |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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?
Infantry will now follow building rally point after healing.
Closes #221