tweak(gamemessage): Remove unused argument of MSG_DESTROY_SELECTED_GROUP#2664
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Include/Common/MessageStream.h | Updates the MSG_DESTROY_SELECTED_GROUP doc comment from the inaccurate (teamID) description to a clearer behavioral description. |
| Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp | Removes the unused appendBooleanArgument(true) call and its misleading comment; adds a @tweak note explaining the rationale. |
| GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h | Mirror of the Generals header change — same doc comment correction for MSG_DESTROY_SELECTED_GROUP. |
| GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp | Mirror of the Generals source change — removes the dead boolean argument and adds the explanatory @tweak comment. |
Sequence Diagram
sequenceDiagram
participant UI as InGameUI
participant MS as TheMessageStream
participant CX as CommandXlat
participant GLD as GameLogicDispatch
UI->>MS: appendMessage(MSG_DESTROY_SELECTED_GROUP)
Note over UI,MS: Before: also appended boolean true (unused)
MS->>CX: dispatch MSG_DESTROY_SELECTED_GROUP
CX->>CX: m_teamExists = false
MS->>GLD: dispatch MSG_DESTROY_SELECTED_GROUP
GLD->>GLD: setCurrentlySelectedAIGroup(nullptr)
Reviews (2): Last reviewed commit: "Replicated in Generals." | Re-trigger Greptile
|
Replicated in Generals. FWIW, I probably have two more PRs coming up that make similar changes. |
This PR makes a small tweak to
GameMessage::MSG_DESTROY_SELECTED_GROUP. It had an unused boolean argument, but it's called many times; on every left mouse click that's not on the HUD, actually. The removal should provide a modest reduction in the number of bytes that are stored in replays or sent across the network.TODO: