File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate
Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -126,16 +126,26 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms)
126
126
if (!isAllowedToRespondToAiCommands (parms))
127
127
return ;
128
128
129
+ const StateID currentState = getStateMachine ()->getCurrentStateID ();
130
+
131
+ #if !RETAIL_COMPATIBLE_CRC
132
+ // TheSuperHackers @bugfix andrew-2e128 / Mauller 14/07/2025 prevent hacking hackers packing and unpacking when commanded to hack the internet
133
+ if (parms->m_cmd == AICMD_HACK_INTERNET && ( currentState == HACK_INTERNET || currentState == UNPACKING ) )
134
+ {
135
+ return ;
136
+ }
137
+ #endif
138
+
129
139
// If our hacker is currently packing up his gear, we need to prevent him
130
140
// from moving until completed. In order to accomplish this, we'll detect,
131
141
// then
132
- if ( getStateMachine ()-> getCurrentStateID () == HACK_INTERNET || getStateMachine ()-> getCurrentStateID () == PACKING )
142
+ if ( currentState == HACK_INTERNET || currentState == PACKING )
133
143
{
134
144
// nuke any existing pending cmd
135
145
m_pendingCommand.store (*parms);
136
146
m_hasPendingCommand = true ;
137
147
138
- if ( getStateMachine ()-> getCurrentStateID () == HACK_INTERNET )
148
+ if ( currentState == HACK_INTERNET )
139
149
{
140
150
getStateMachine ()->clear ();
141
151
setLastCommandSource ( CMD_FROM_AI );
Original file line number Diff line number Diff line change @@ -126,16 +126,26 @@ void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms)
126
126
if (!isAllowedToRespondToAiCommands (parms))
127
127
return ;
128
128
129
+ const StateID currentState = getStateMachine ()->getCurrentStateID ();
130
+
131
+ #if !RETAIL_COMPATIBLE_CRC
132
+ // TheSuperHackers @bugfix andrew-2e128 / Mauller 14/07/2025 prevent hacking hackers packing and unpacking when commanded to hack the internet
133
+ if (parms->m_cmd == AICMD_HACK_INTERNET && ( currentState == HACK_INTERNET || currentState == UNPACKING ) )
134
+ {
135
+ return ;
136
+ }
137
+ #endif
138
+
129
139
// If our hacker is currently packing up his gear, we need to prevent him
130
140
// from moving until completed. In order to accomplish this, we'll detect,
131
141
// then
132
- if ( getStateMachine ()-> getCurrentStateID () == HACK_INTERNET || getStateMachine ()-> getCurrentStateID () == PACKING )
142
+ if ( currentState == HACK_INTERNET || currentState == PACKING )
133
143
{
134
144
// nuke any existing pending cmd
135
145
m_pendingCommand.store (*parms);
136
146
m_hasPendingCommand = true ;
137
147
138
- if ( getStateMachine ()-> getCurrentStateID () == HACK_INTERNET )
148
+ if ( currentState == HACK_INTERNET )
139
149
{
140
150
getStateMachine ()->clear ();
141
151
setLastCommandSource ( CMD_FROM_AI );
You can’t perform that action at this time.
0 commit comments