Skip to content

bugfix(contain): Let passengers exit a China Overlord with a Battle Bunker - #3668

Open
Okladnoj wants to merge 1 commit into
TheSuperHackers:mainfrom
Okladnoj:okji/fix/overlord-bunker-exit
Open

Okladnoj wants to merge 1 commit into
TheSuperHackers:mainfrom
Okladnoj:okji/fix/overlord-bunker-exit

Conversation

@Okladnoj

@Okladnoj Okladnoj commented Nov 9, 2026

Copy link
Copy Markdown

Problem: with RETAIL_COMPATIBLE_CRC disabled, passengers cannot leave a China Overlord with the Battle Bunker upgrade (load infantry into the Battle Bunker, press Evacuate or a passenger's exit button — nobody comes out). Retail-compatible builds are not affected: the exit check from #3089 is compiled out there.

China Overlord passengers ride in the Battle Bunker rider, so their getContainedBy() points at the Battle Bunker, while the exit command addresses the China Overlord. OverlordContain did not override isContained(), so OpenContain::isContained() compared against the China Overlord and #3089 rejected every passenger. Now OverlordContain forwards isContained() to the redirected contain, as it already does for getContainedItemsList().

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Both game code variants add an isContained override to OverlordContain. The method checks TransportContain when no redirected contain is available. Otherwise, it delegates the query to the redirected contain.

Changes

OverlordContain containment queries

Layer / File(s) Summary
Containment query delegation
Generals/Code/GameEngine/Include/GameLogic/Module/OverlordContain.h, Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp, GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverlordContain.h, GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp
Both variants declare and implement isContained. The method checks TransportContain when no redirected contain is available; otherwise, it delegates the query to the redirected contain.

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

Change: Bug fix

Suggested labels: Bug, Minor, Gen, ZH, NoRetail

Suggested reviewers: bobtista

Merge Risk: Minimal · up to f9983

The change aligns Overlord passenger membership checks with Battle Bunker redirection in both game variants. No supported merge-blocking issue remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the passenger-exit fix for a China Overlord with a Battle Bunker.
Description check Passed The description explains the passenger-exit problem and how forwarding isContained() to the redirected contain addresses it.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9d4b807-b9a4-4aaa-948c-550a6e7a61cc
Commits

Reviewing files that changed from the base of the PR and between b42b7d3 and f998348.

Files selected for processing: 4

  • Generals/Code/GameEngine/Include/GameLogic/Module/OverlordContain.h
  • Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp
  • GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverlordContain.h
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp

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

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds OverlordContain::isContained() in both Generals and Zero Hour so Battle Bunker passengers can pass the exit check.

  • Passengers can exit China Overlords with Battle Bunkers.

Reviews (1) · Last reviewed commit: "bugfix(contain): Let passengers exit a C..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant