Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameengine): resume attack-move after a jet reloads

Olcay Seygan6a1e4db93d45
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp
index 74145d654..3185844b6 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp
@@ -2474,6 +2474,9 @@ void JetAIUpdate::aiDoCommand(const AICommandParms* parms)
case AICMD_GUARD_AREA:
case AICMD_HUNT:
case AICMD_GUARD_RETALIATE:
+ // like hunt, an attack-move is a standing order: if we run dry partway through it,
+ // go reload and then pick the order back up, rather than dropping it and idling.
+ case AICMD_ATTACKMOVE_TO_POSITION:
setFlag(ALLOW_INTERRUPT_AND_RESUME_OF_CUR_STATE_FOR_RELOAD, true);
break;
default: