Opened 4 years ago

Last modified 3 years ago

#5816 new defect

Disable observers to send commands on client side — at Version 1

Reported by: bb Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords: simple
Cc: Patch:

Description (last modified by bb)

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 cmd -1.

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.

Change History (1)

comment:1 by bb, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.