1
0
forked from mirrors/0ad

See the explored territory of defeated players in observermode.

This was SVN commit r18845.
This commit is contained in:
elexis
2016-10-20 16:31:52 +00:00
parent 7b37ed8c05
commit d5b85c7ffc
@@ -373,12 +373,10 @@ Player.prototype.SetState = function(newState, resign)
this.state = newState;
let won = newState == "won";
// Reveal map to all or only that player
let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
cmpRangeManager.SetLosRevealAll(won ? -1 : this.playerID, true);
if (!won)
if (won)
cmpRangeManager.SetLosRevealAll(this.playerID, true);
else
{
// Reassign all player's entities to Gaia
let entities = cmpRangeManager.GetEntitiesByPlayer(this.playerID);