HomeWildfire Games

Stop serializing minimap playercolors

Description

Stop serializing minimap playercolors

Patch By: temple
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1124

Event Timeline

bb added inline comments.Jan 7 2018, 10:24 PM
/ps/trunk/binaries/data/mods/public/gui/session/session.js
281

In current code this call could have been in the player component.
But when coming back to the session from another page (like the sumscreen) and the minimap is changed from that page (f.e. have a page to choose the colors), the minimap needs to be updated, thus we need such a call.
Also when we want to tread the colors as gui objects (f.e. the color choosing or diplo colors) we shouldn't set the color from the sim, but from the gui.
These things ofc doesn't happen in current svn as the only way to change a color is with a ownershipChange, and those are send from the sim anyway, the call could have been in the sim. But already having it here doesn't hurt imo

elexis added a subscriber: elexis.Jan 9 2018, 2:01 PM
elexis added inline comments.
/ps/trunk/binaries/data/mods/public/gui/session/session.js
281

(Still feels counterintuitive (independent of D754), since in non-visual replaymode, the minimap colors will never be initialized. Might be no problem because they don't influence the simulation and are not serialized, but in theory the simulation initialization should be independent of the GUI.)

bb added inline comments.Jan 9 2018, 2:16 PM
/ps/trunk/binaries/data/mods/public/gui/session/session.js
281

If we go that way perhaps the whole minimap should become a gui object, instead of hiding it in the sim