Disable observers to send commands on client side
|Reported by:||bb||Owned by:|
Description (last modified by )
Arguably observers shouldn't send commands. However they can. This (except in some rare cases #5140) does not cause the sim-state to change (phab:D2810 is there to fix everything sim-related). Nevertheless, the commands should be disabled from clientside too, to avoid useless network traffic and unneeded replay entries.
One can send a command as observer by:
Start a game as observer.
Switch to a player.
Select a unit.
Press "h" (stop hotkey, works with more hotkeys, back-to-work probably)
Now look at the replay and see
This could be fixed on the JS side, but that would be checking and fixing every individual command. Instead, we could disallow commands for observers to be processed in PostNetworkCommand (or wherever down the line seems suitable) in the engine.
Thanks to go2die for reporting the issue.