fix(logic): Improve handling of ENABLE_RETALIATION_MODE in GameLogicDispatch and optimize the MSG#2408
Conversation
|
GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
Outdated
Show resolved
Hide resolved
| { | ||
| //Logically turns on or off retaliation mode for a specified player. | ||
| Int playerIndex = msg->getArgument( 0 )->integer; | ||
| #if RETAIL_COMPATIBLE_CRC |
There was a problem hiding this comment.
Probably actually use RETAIL_COMPATIBLE_NETWORKING here because it doesn't change the CRC
There was a problem hiding this comment.
I expect it can still be part of replays if it was recorded while someone used a Control Hack.
There was a problem hiding this comment.
OK but those will still mismatch with current patch as we don't read the player index from the msg argument anymore
There was a problem hiding this comment.
So it's the same question as in #2380 about whether to allow the control hack in retail compat mode
|
I'm fine with the current code, but I do think either the comment could be more informative and / or there could be an assertion like |
Simplifies the code and prevents other players from setting each others retaliation mode. Tested with 1k replays and with own replay where I swap the retaliation mode on both sides couple times and test with some combat.
Generals (not Zero Hour) does not have a retaliation mode
Null check of
thisPlayerwill be handled by #2383