Opened 2 years ago

Last modified 13 months ago

#5816 new defect

Disable observers to send commands on client side

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.

Thanks to go2die for reporting the issue.

Change History (6)

comment:1 by bb, 2 years ago

Description: modified (diff)

comment:2 by bb, 2 years ago

Description: modified (diff)

comment:4 by Silier, 23 months ago


Do not process commands sent by observers.

Differential Revision: D2810
Reviewed by: @bb.
Refs #5140.

comment:5 by Silier, 13 months ago

Keywords: simple removed
severity: simple

comment:6 by Silier, 13 months ago

Keywords: simple added
Note: See TracTickets for help on using tickets.