unify(commandxlat): Move AcademyStats files to Core and merge CommandXlat and related code from Zero Hour#2765
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp | Large merge from Zero Hour: adds Firebase force-attack logic, GLA sabotage building, cliff-cursor detection, double-click attack-move guard, special power shortcut selection, and cheat/demo commands under _ALLOW_DEBUG_CHEATS_IN_RELEASE. Two known issues tracked separately in #2768 and #2769. |
| Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp | Adds new getClosestRider() helper used by the Firebase force-attack path; closestDistance local variable is left uninitialized (safe due to short-circuit but will generate compiler warnings). |
| Core/GameEngine/Include/Common/AcademyStats.h | Moved from ZH-only to Core (shared); uses #pragma once, correct GPL header, no issues found. |
| Generals/Code/GameEngine/Include/Common/KindOf.h | Adds ~25 new KindOf flags ported from Zero Hour, guards KINDOF_AIRFIELD with #if RTS_GENERALS, replaces KINDOF_DRONE with KINDOF_NO_SELECT for drone-selection filtering; static_assert validates the name list. |
| Generals/Code/GameEngine/Include/GameClient/InGameUI.h | Adds ACTIONTYPE_SABOTAGE_BUILDING, camera-tracking drawable accessors, and double-click attack-move hint state; new members use spaces inconsistent with surrounding tab-indented code. |
| Generals/Code/GameEngine/Source/Common/RTS/SpecialPower.cpp | Adds AcademyClassify INI field; column alignment of new entry is misaligned relative to the surrounding parse table block. |
| GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp | Fixes null-deref guard on workerShoeTemplate, adds RETAIL_COMPATIBLE_NETWORKING guard around appendRealArgument, removes duplicate banner comments; no new logic issues found. |
| Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp | Implements double-click attack-move guard hint (triggerDoubleClickAttackMoveGuardHint, timer-based radius cursor fade); new code uses spaces where surrounding code uses tabs. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MSG_MOUSE_DOUBLE_CLICK or MSG_MOUSE_CLICK] --> B{doubleClickAttackMove & correct mouse mode?}
B -- Yes --> C[Append MSG_DO_GUARD_POSITION / recordDoubleClickAttackMoveOrderGiven / triggerDoubleClickAttackMoveGuardHint]
B -- No --> D[Normal click handling: move / context command]
E[evaluateContextCommand] --> F{commandType?}
F -- GUI_COMMAND_SPECIAL_POWER_FROM_SHORTCUT --> G[findMostReadyShortcutSpecialPowerOfType / issueSpecialPowerCommand]
F -- GUI_COMMAND_SPECIAL_POWER_CONSTRUCT --> H[issueSpecialPowerCommand for construction placement]
F -- GUICOMMANDMODE_SABOTAGE_BUILDING --> I[createEnterMessage or MSG_SABOTAGE_HINT]
J[canObjectForceAttack with victim] --> K{isKindOf SPAWNS_ARE_THE_WEAPONS?}
K -- No --> L[Standard weapon check]
K -- Yes --> M{result already POSSIBLE?}
M -- No --> N[Check spawn slave]
M -- Yes Firebase --> O[getClosestRider / check rider attack result]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[MSG_MOUSE_DOUBLE_CLICK or MSG_MOUSE_CLICK] --> B{doubleClickAttackMove & correct mouse mode?}
B -- Yes --> C[Append MSG_DO_GUARD_POSITION / recordDoubleClickAttackMoveOrderGiven / triggerDoubleClickAttackMoveGuardHint]
B -- No --> D[Normal click handling: move / context command]
E[evaluateContextCommand] --> F{commandType?}
F -- GUI_COMMAND_SPECIAL_POWER_FROM_SHORTCUT --> G[findMostReadyShortcutSpecialPowerOfType / issueSpecialPowerCommand]
F -- GUI_COMMAND_SPECIAL_POWER_CONSTRUCT --> H[issueSpecialPowerCommand for construction placement]
F -- GUICOMMANDMODE_SABOTAGE_BUILDING --> I[createEnterMessage or MSG_SABOTAGE_HINT]
J[canObjectForceAttack with victim] --> K{isKindOf SPAWNS_ARE_THE_WEAPONS?}
K -- No --> L[Standard weapon check]
K -- Yes --> M{result already POSSIBLE?}
M -- No --> N[Check spawn slave]
M -- Yes Firebase --> O[getClosestRider / check rider attack result]
Reviews (2): Last reviewed commit: "unify(commandxlat): Merge CommandXlat an..." | Re-trigger Greptile
20d30ca to
dc1d36b
Compare
|
Pull id's added to commit titles. |
Tracked with #2800 |
Merge with Rebase
This change has 2 commits.
Behavior should be unchanged in both games.
Generals gets
AcademyStatsclassKindOfflags from Zero Hour (Drone selection and Airfields required a migration strategy)TODO