Skip to content

Commit

Permalink
Fix GPS being given to *everyone*
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Feb 4, 2011
1 parent 504fe9e commit 39a9bd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions OpenRA.Mods.RA/SupportPowers/GpsPower.cs
Expand Up @@ -59,9 +59,10 @@ public void Damaged(Actor self, AttackInfo e)

void RefreshGps(Actor self)
{
self.World.LocalShroud.Disabled = self.World.Queries.WithTrait<GpsPower>()
.Any(p => p.Actor.Owner.Stances[self.Owner] == Stance.Ally &&
p.Trait.Granted);
if (self.World.LocalPlayer != null)
self.World.LocalShroud.Disabled = self.World.Queries.WithTrait<GpsPower>()
.Any(p => p.Actor.Owner.Stances[self.World.LocalPlayer] == Stance.Ally &&
p.Trait.Granted);
}
}
}

0 comments on commit 39a9bd7

Please sign in to comment.