Merge pull request #4891 from cjshmyr/spy-health

Fix enemy spies showing an enemy health bar when disguised as an ally - closes #4780
This commit is contained in:
Matthias Mailänder
2014-03-17 20:55:58 +01:00
4 changed files with 13 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA
if (stance == Stance.Ally)
return true;
if (self.EffectiveOwner != null && self.EffectiveOwner.Disguised && !toActor.HasTrait<IgnoresDisguise>())
if (self.IsDisguised() && !toActor.HasTrait<IgnoresDisguise>())
return toActor.Owner.Stances[self.EffectiveOwner.Owner] == Stance.Ally;
return stance == Stance.Ally;
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA
if (stance == Stance.Ally)
return false; /* otherwise, we'll hate friendly disguised spies */
if (self.EffectiveOwner != null && self.EffectiveOwner.Disguised && !toActor.HasTrait<IgnoresDisguise>())
if (self.IsDisguised() && !toActor.HasTrait<IgnoresDisguise>())
return toActor.Owner.Stances[self.EffectiveOwner.Owner] == Stance.Enemy;
return stance == Stance.Enemy;