Fix GPS being given to *everyone*

This commit is contained in:
Chris Forbes
2011-02-03 13:15:38 +13:00
parent 504fe9e427
commit 39a9bd7e20

View File

@@ -59,8 +59,9 @@ namespace OpenRA.Mods.RA
void RefreshGps(Actor self)
{
if (self.World.LocalPlayer != null)
self.World.LocalShroud.Disabled = self.World.Queries.WithTrait<GpsPower>()
.Any(p => p.Actor.Owner.Stances[self.Owner] == Stance.Ally &&
.Any(p => p.Actor.Owner.Stances[self.World.LocalPlayer] == Stance.Ally &&
p.Trait.Granted);
}
}