Opened 8 years ago

Closed 8 years ago

#3850 closed defect (fixed)

Entity selection rectangle needs to take fog-of-war into account for observers

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


Since #3168 observers can change the perspective of different players, showing the fog-of-war of that specific player.

But when selecting entities with the mouse cursor, the fog-of-war is not taken into account. (Same goes for the statusbar-hotkey). This means the according needs to use g_ViewedPlayer instead of Engine.GetPlayerID() in some JS part, or GetCurrentDisplayedPlayer() in some C++ part.

Change History (5)

comment:1 by elexis, 8 years ago

In 18223:

Take new observermode into account in some missing places, refs #3850, #3168.

comment:2 by elexis, 8 years ago

Milestone: BacklogAlpha 21

Mostly fixed, but two more minor things could be improved:

  • Keeping tab pressed while changing the perspective keeps the status bars
  • Selecting an entity then changing the perspective keeps the entity selected, even if i'ts in FoW.

comment:3 by elexis, 8 years ago

The rest seems to be identical to #3999, GetSimState and others will probably have to be updated to use the viewed player as well.

comment:4 by elexis, 8 years ago

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:5 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18285:

Observermode cleanup, fixes #3850.

Recalculate status bars when changing the perspective.

Note: See TracTickets for help on using tickets.