From d5b85c7ffcead984afbbd0271f0c668a82db9c02 Mon Sep 17 00:00:00 2001 From: elexis Date: Thu, 20 Oct 2016 16:31:52 +0000 Subject: [PATCH] See the explored territory of defeated players in observermode. This was SVN commit r18845. --- binaries/data/mods/public/simulation/components/Player.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/Player.js b/binaries/data/mods/public/simulation/components/Player.js index 89986af1d5..451d0a4a63 100644 --- a/binaries/data/mods/public/simulation/components/Player.js +++ b/binaries/data/mods/public/simulation/components/Player.js @@ -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);