Skip to content

Commit e4eac2e

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

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate
  • Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,20 @@ UpdateSleepTime JetAIUpdate::update()
17761776
getStateMachine()->clear();
17771777
setLastCommandSource( CMD_FROM_AI );
17781778
getStateMachine()->setState( TAKING_OFF_AWAIT_CLEARANCE );
1779+
1780+
#if !RETAIL_COMPATIBLE_CRC
1781+
// TheSuperHackers @bugfix arcticdolphin 02/03/2026 Move healed helicopter to rally point if present.
1782+
if (Object *airfield = TheGameLogic->findObjectByID( jet->getProducerID() ))
1783+
{
1784+
if (ExitInterface *exitInterface = airfield->getObjectExitInterface())
1785+
{
1786+
if (const Coord3D *rallyPoint = exitInterface->getRallyPoint())
1787+
{
1788+
aiMoveToPosition( rallyPoint, CMD_FROM_AI );
1789+
}
1790+
}
1791+
}
1792+
#endif
17791793
}
17801794
else
17811795
{

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,20 @@ UpdateSleepTime JetAIUpdate::update()
19981998
getStateMachine()->clear();
19991999
setLastCommandSource( CMD_FROM_AI );
20002000
getStateMachine()->setState( TAKING_OFF_AWAIT_CLEARANCE );
2001+
2002+
#if !RETAIL_COMPATIBLE_CRC
2003+
// TheSuperHackers @bugfix arcticdolphin 02/03/2026 Move healed helicopter to rally point if present.
2004+
if (Object *airfield = TheGameLogic->findObjectByID( jet->getProducerID() ))
2005+
{
2006+
if (ExitInterface *exitInterface = airfield->getObjectExitInterface())
2007+
{
2008+
if (const Coord3D *rallyPoint = exitInterface->getRallyPoint())
2009+
{
2010+
aiMoveToPosition( rallyPoint, CMD_FROM_AI );
2011+
}
2012+
}
2013+
}
2014+
#endif
20012015
}
20022016
else
20032017
{

0 commit comments

Comments
 (0)