From 798aff11409c48bdd381a637b0a678ab8e87a508 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Mon, 14 Sep 2020 17:43:33 +0200 Subject: [PATCH] Fix ValidStances of RevealsMap not working --- OpenRA.Mods.Common/Traits/RevealsMap.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/RevealsMap.cs b/OpenRA.Mods.Common/Traits/RevealsMap.cs index b82d7c7347..29e5298c7a 100644 --- a/OpenRA.Mods.Common/Traits/RevealsMap.cs +++ b/OpenRA.Mods.Common/Traits/RevealsMap.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits protected void AddCellsToPlayerShroud(Actor self, Player p, PPos[] uv) { - if (!Info.ValidStances.HasStance(p.Stances[self.Owner])) + if (!Info.ValidStances.HasStance(self.Owner.Stances[p])) return; p.Shroud.AddSource(this, type, uv); @@ -63,7 +63,8 @@ namespace OpenRA.Mods.Common.Traits protected override void TraitEnabled(Actor self) { - AddCellsToPlayerShroud(self, self.Owner, ProjectedCells(self)); + foreach (var player in self.World.Players) + AddCellsToPlayerShroud(self, player, ProjectedCells(self)); } protected override void TraitDisabled(Actor self)