-
Notifications
You must be signed in to change notification settings - Fork 151
bugfix(aigroup): GLA Battle Bus can now respond to attack commands while in bunkered form #2213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
bugfix(aigroup): GLA Battle Bus can now respond to attack commands while in bunkered form #2213
Conversation
…ses (and any other immobile objects)
Greptile Overview
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp | Wraps DISABLED_HELD check in RETAIL_COMPATIBLE_CRC to fix Battle Bus attack commands |
| GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp | Wraps DISABLED_HELD check in RETAIL_COMPATIBLE_CRC to fix Battle Bus attack commands |
Sequence Diagram
sequenceDiagram
participant Player
participant AIGroup
participant BattleBus
participant Occupants
Player->>AIGroup: Issue attack command on target
AIGroup->>AIGroup: groupAttackObjectPrivate()
AIGroup->>AIGroup: Iterate through member list
alt RETAIL_COMPATIBLE_CRC=1 (Old behavior)
AIGroup->>BattleBus: Check isDisabledByType(DISABLED_HELD)
BattleBus-->>AIGroup: Returns true (bunkered)
AIGroup->>AIGroup: continue (skip unit)
Note over AIGroup,Occupants: Bug: Occupants never receive attack command
else RETAIL_COMPATIBLE_CRC=0 (Fixed behavior)
AIGroup->>AIGroup: Skip DISABLED_HELD check
AIGroup->>BattleBus: Add to attack iterator
AIGroup->>BattleBus: Check isPassengerAllowedToFire()
BattleBus-->>AIGroup: Returns true
AIGroup->>Occupants: Issue attack command to occupants
Occupants->>Player: Respond to attack command
end
Fixes #1224 from the patch repository
This change fixes an issue where the GLA Battle Bus is unable to respond to attack commands issued on an object while in bunkered form.
Demonstration
With the fix applied, the Battle Bus can now attack the specified target
BUS_ATTACK.mp4