From a923a72c51868487a8ef9b746a5dbec322fd2366 Mon Sep 17 00:00:00 2001 From: tintinhamans <5984296+tintinhamans@users.noreply.github.com> Date: Thu, 15 Oct 2026 22:13:02 +0200 Subject: [PATCH] fix(hacker): Keep contained hackers hacking when Stop is pressed --- .../Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 10 +++++++++- .../Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index 34cd3b15353..54f806e73ae 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -129,8 +129,16 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) const StateID currentState = getStateMachine()->getCurrentStateID(); #if !RETAIL_COMPATIBLE_CRC + const Bool isUnpackingOrHacking = currentState == UNPACKING || currentState == HACK_INTERNET; + + // TheSuperHackers @bugfix arcticdolphin 15/10/2026 prevent the player-issued Stop command from interrupting contained hackers, e.g. in the Internet Center. + if (parms->m_cmd == AICMD_IDLE && parms->m_cmdSource == CMD_FROM_PLAYER && isUnpackingOrHacking && getObject()->isContained()) + { + return; + } + // TheSuperHackers @bugfix andrew-2e128 / Mauller 14/07/2025 prevent hacking hackers packing and unpacking when commanded to hack the internet - if (parms->m_cmd == AICMD_HACK_INTERNET && ( currentState == HACK_INTERNET || currentState == UNPACKING ) ) + if (parms->m_cmd == AICMD_HACK_INTERNET && isUnpackingOrHacking) { return; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index 1c586024521..cdda327a47a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -129,8 +129,16 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) const StateID currentState = getStateMachine()->getCurrentStateID(); #if !RETAIL_COMPATIBLE_CRC + const Bool isUnpackingOrHacking = currentState == UNPACKING || currentState == HACK_INTERNET; + + // TheSuperHackers @bugfix arcticdolphin 15/10/2026 prevent the player-issued Stop command from interrupting contained hackers, e.g. in the Internet Center. + if (parms->m_cmd == AICMD_IDLE && parms->m_cmdSource == CMD_FROM_PLAYER && isUnpackingOrHacking && getObject()->isContained()) + { + return; + } + // TheSuperHackers @bugfix andrew-2e128 / Mauller 14/07/2025 prevent hacking hackers packing and unpacking when commanded to hack the internet - if (parms->m_cmd == AICMD_HACK_INTERNET && ( currentState == HACK_INTERNET || currentState == UNPACKING ) ) + if (parms->m_cmd == AICMD_HACK_INTERNET && isUnpackingOrHacking) { return; }