Skip to content

Commit 71cb59e

Browse files
committed
bugfix(ai): move healed Chinook to rally point if present
Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
1 parent ac14263 commit 71cb59e

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,20 @@ UpdateSleepTime ChinookAIUpdate::update()
10321032
// we're completely healed, so take off again
10331033
pp->setHealee(getObject(), false);
10341034
setMyState(TAKING_OFF, nullptr, nullptr, CMD_FROM_AI);
1035+
1036+
#if !RETAIL_COMPATIBLE_CRC
1037+
// TheSuperHackers @bugfix arcticdolphin 02/03/2026 Move healed Chinook to rally point if present.
1038+
if (Object *airfield = TheGameLogic->findObjectByID( m_airfieldForHealing ))
1039+
{
1040+
if (ExitInterface *exitInterface = airfield->getObjectExitInterface())
1041+
{
1042+
if (const Coord3D *rallyPoint = exitInterface->getRallyPoint())
1043+
{
1044+
aiMoveToPosition( rallyPoint, CMD_FROM_AI );
1045+
}
1046+
}
1047+
}
1048+
#endif
10351049
}
10361050
else
10371051
{

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,20 @@ UpdateSleepTime ChinookAIUpdate::update()
10941094
// we're completely healed, so take off again
10951095
pp->setHealee(getObject(), false);
10961096
setMyState(TAKING_OFF, nullptr, nullptr, CMD_FROM_AI);
1097+
1098+
#if !RETAIL_COMPATIBLE_CRC
1099+
// TheSuperHackers @bugfix arcticdolphin 02/03/2026 Move healed Chinook to rally point if present.
1100+
if (Object *airfield = TheGameLogic->findObjectByID( m_airfieldForHealing ))
1101+
{
1102+
if (ExitInterface *exitInterface = airfield->getObjectExitInterface())
1103+
{
1104+
if (const Coord3D *rallyPoint = exitInterface->getRallyPoint())
1105+
{
1106+
aiMoveToPosition( rallyPoint, CMD_FROM_AI );
1107+
}
1108+
}
1109+
}
1110+
#endif
10971111
}
10981112
else
10991113
{

0 commit comments

Comments
 (0)