Skip to content

bugfix(aiupdate): Keep contained hackers hacking when Stop is pressed - #3533

Merged
xezon merged 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/internet-center-stop
Oct 19, 2026
Merged

xezon merged 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/internet-center-stop

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Oct 15, 2026 •

Copy link
Copy Markdown

Closes #136

Stop is forwarded to the hackers inside an Internet Center and makes them pack up and go idle. The center only starts them hacking when they enter, so they stay idle until evacuated and sent back in.

HackInternetAIUpdate::aiDoCommand now ignores player-issued Stop while the hacker is contained and currently unpacking or hacking. This also covers modded containers without the Internet Center flag. On-foot Stop, evacuation and engine-issued idle commands are unchanged.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8cdf31d7-474d-40af-b4ac-5e99bcf0848a
📥 Commits

Reviewing files that changed from the base of the PR and between de76048b7e3c870ea3a69360cf810453f7c1596c and a923a72.

📒 Files selected for processing: 2
  • Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Walkthrough

HackInternetAIUpdate::aiDoCommand now ignores player-issued idle commands for contained hackers that are unpacking or hacking. Both variants use a shared predicate in the hack-command guard.

Changes

Hacker Command Handling

Layer / File(s) Summary
Guard commands during unpacking and hacking
Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp, GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp
Both variants ignore player-issued idle commands for contained hackers that are unpacking or hacking. The Generals variant replaces separate hack-command checks with the shared state predicate. The GeneralsMD variant updates the hack-command guard to use that predicate.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to a923a

Contained hackers continue working when the player presses Stop, while the existing hacking startup and state transitions remain unchanged. No material merge risk is identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Linked Issues check Passed Issue #136 requires a contained China hacker to continue hacking after the player presses Stop. In both Generals and GeneralsMD, HackInternetAIUpdate::aiDoCommand returns for player-issued `AICM…
Out of Scope Changes check Passed The changes are limited to the two HackInternetAIUpdate.cpp implementations. The shared state predicate supports the linked fix and preserves the existing hack-command guard. The containment check l…
Title check Passed The title clearly identifies the AI update bug and the intended behavior: contained hackers continue hacking when Stop is pressed.
Description check Passed The description accurately explains the Stop command issue, the code change, the affected containment states, and unchanged behavior.
Full details: Linked Issues check

Explanation

Issue #136 requires a contained China hacker to continue hacking after the player presses Stop. In both Generals and GeneralsMD, HackInternetAIUpdate::aiDoCommand returns for player-issued AICMD_IDLE when the object is contained and the state is UNPACKING or HACK_INTERNET. The command therefore does not start packing. The issue specifies no separate automated-test requirement.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the two HackInternetAIUpdate.cpp implementations. The shared state predicate supports the linked fix and preserves the existing hack-command guard. The containment check limits the new Stop behavior to contained hackers. Other command sources and on-foot hackers remain unchanged.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Keeps contained hackers unpacking or hacking when the player presses Stop.

  • Contained hackers keep working when players press Stop.

Reviews (6) · Last reviewed commit: "fix(hacker): Keep contained hackers hack..." · Reviewed by Greptile

@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from 4799211 to 6321b10 Compare October 15, 2026 21:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da6a2f0b-58ca-4a6d-b62d-154bb94fb78d
📥 Commits

Reviewing files that changed from the base of the PR and between 47992112391f9a90286cb0b7e3b98fed71a8983c and 6321b109114d1de5c8157e6069f6d70b8901f6f2.

📒 Files selected for processing: 1
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from 6321b10 to 4ab3154 Compare October 17, 2026 21:06
@tintinhamans tintinhamans changed the title bugfix(hacker): Keep Internet Center hackers hacking when Stop is pressed bugfix(hacker): Keep contained hackers hacking when Stop is pressed Oct 17, 2026
@Caball009 Caball009 added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Oct 17, 2026
@Caball009

Caball009 commented Oct 17, 2026 •

Copy link
Copy Markdown

Not sure if you're waiting for approval first, but this needs to be replicated to Generals.

@tintinhamans

Copy link
Copy Markdown
Author

Ahh, there was no internet center in Generals so didn't add it originally.

@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from 4ab3154 to 6d59e95 Compare October 17, 2026 22:27
@tintinhamans

Copy link
Copy Markdown
Author

Replicated to Generals as well.

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logically looks ok. Can be polished more.

@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from 6d59e95 to de76048 Compare October 18, 2026 12:07
@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from de76048 to 2520c0b Compare October 18, 2026 20:43
@tintinhamans
tintinhamans force-pushed the arctic/fix/internet-center-stop branch from 2520c0b to a923a72 Compare October 18, 2026 20:45

@Caball009 Caball009 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.

@xezon xezon changed the title bugfix(hacker): Keep contained hackers hacking when Stop is pressed bugfix(aiupdate): Keep contained hackers hacking when Stop is pressed Oct 19, 2026
@xezon xezon added the China Affects China faction label Oct 19, 2026

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Happy hackers.

@xezon
xezon merged commit ea40abb into TheSuperHackers:main Oct 19, 2026
25 checks passed
@tintinhamans
tintinhamans deleted the arctic/fix/internet-center-stop branch October 19, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing China Affects China faction Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

China Hacker(s) stop hacking inside Internet Center when pressing STOP key

3 participants