chore(gamemessage): Clean up GameMessage::getCommandTypeAsString#2695
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/Common/MessageStream.cpp | Switch statement cleaned up to match enum order; missing case labels added and ALLOW_SURRENDER blocks consolidated. Changes are correct relative to the Generals header enum. |
| GeneralsMD/Code/GameEngine/Source/Common/MessageStream.cpp | Switch statement fully re-synced with the ZH enum: fast-forward/pause messages moved earlier, ALLOW_SURRENDER consolidated, MSG_ENABLE_RETALIATION_MODE added, and debug-network guard extended to include _ALLOW_DEBUG_CHEATS_IN_RELEASE. |
Reviews (4): Last reviewed commit: "Replicated in Generals (manually)." | Re-trigger Greptile
| #ifdef ALLOW_SURRENDER | ||
| CASE_LABEL(MSG_DO_SURRENDER) | ||
| CASE_LABEL(MSG_RETURN_TO_PRISON) | ||
| CASE_LABEL(MSG_PICK_UP_PRISONER) |
There was a problem hiding this comment.
They are referenced in GameLogicDispatch.cpp and CommandXlat.cpp however. Maybe add the enum values instead?
There was a problem hiding this comment.
These look like network messages, though. They can't be behind a macro, and I'm also reluctant to add them without a macro.
I could just keep them in the switch statement and leave it for another time.
There was a problem hiding this comment.
They can just be treated like any other META message
There was a problem hiding this comment.
META indicates Client side only, and these are Logic messages. I've put them back in.
86c5a7c to
9041515
Compare
|
Replicated in Generals by hand. Gen code is now the same except for 28 ZH specific enum values (and |
This PR cleans up the switch statement in
GameMessage::getCommandTypeAsStringto make it exactly like theGameMessageenum.Checks commits for clean diff.
TODO: