From e665fd7c5ef4deceb10daa8cd61f6872d71d14b6 Mon Sep 17 00:00:00 2001 From: andrew-2e128 Date: Fri, 7 Mar 2025 22:25:37 +0200 Subject: [PATCH] Hackers pack and unpack unnecessary when selected in a group fixed. --- .../Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 10 ++++++++++ .../Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) 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 64f245abf0..e90f09874f 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -126,6 +126,16 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) if (!isAllowedToRespondToAiCommands(parms)) return; + // TheSuperHackers @bugfix andrew-2e128 07/03/2025 Hackers pack and unpack unnecessary when selected in a group fixed. - issue #223 + if (parms->m_cmd == AICMD_HACK_INTERNET) + { + if ( getStateMachine()->getCurrentStateID() == HACK_INTERNET || getStateMachine()->getCurrentStateID() == UNPACKING ) + { + return; + } + } + // end @bugfix + //If our hacker is currently packing up his gear, we need to prevent him //from moving until completed. In order to accomplish this, we'll detect, //then 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 c5b1e0cfc7..17c6b800a4 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -126,6 +126,16 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) if (!isAllowedToRespondToAiCommands(parms)) return; + // TheSuperHackers @bugfix andrew-2e128 07/03/2025 Hackers pack and unpack unnecessary when selected in a group fixed. - issue #223 + if (parms->m_cmd == AICMD_HACK_INTERNET) + { + if ( getStateMachine()->getCurrentStateID() == HACK_INTERNET || getStateMachine()->getCurrentStateID() == UNPACKING ) + { + return; + } + } + // end @bugfix + //If our hacker is currently packing up his gear, we need to prevent him //from moving until completed. In order to accomplish this, we'll detect, //then