Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3999 closed defect (fixed)

[PATCH] Remove player argument from GUIInterface calls

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

The new observermode #3168 has added a viewedPlayer argument to a good number of GUIInteface calls. It were cleaner to remove the player and let the caller function pass it explicitly, so those functions would have only one argument (which is an object in case multiple arguments need to be passed).

Attachments (1)

3999_guiinterface_cleanup_v1.patch (8.5 KB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (4)

by elexis, 8 years ago

comment:1 by elexis, 8 years ago

Keywords: review patch added; simple removed
Milestone: BacklogAlpha 21
Summary: Remove player argument from GUIInterface calls[PATCH] Remove player argument from GUIInterface calls

Default to the viewed player in the GUIInterface to avoid passing the viewed player separately in some places, refs #3168.

Makes the clearing of the cache in selectViewPlayer of session.js actually relevant. Thereby fixes a fog-of-war selection relict when changing the perspective as described in #3850. This was trivial following r18201. Also removes some unused player arguments.

comment:2 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18283:

GUIInterface / observermode cleanup as recommended by leper, fixes #3999.

Default to the viewed player in the GUIInterface to avoid passing that separately in some places, refs #3168.
Thus GetEntityState will be called for the viewed player instead of observer playerID, therefore
fixes a fog-of-war selection relict when changing the perspective, refs #3850.
Also remove some unused player arguments.

comment:3 by elexis, 8 years ago

Keywords: review removed
Priority: Nice to HaveShould Have
Type: enhancementdefect
Note: See TracTickets for help on using tickets.