Replaced the AlliedMissiles boolean on JamsMissiles by a Stances field (DeflectionStances).

This commit is contained in:
abc013
2016-08-27 16:53:05 +02:00
parent 84d58f78d2
commit c2f21a21ef
2 changed files with 9 additions and 3 deletions

View File

@@ -396,7 +396,7 @@ namespace OpenRA.Mods.Common.Projectiles
if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range.LengthSquared)
return false;
if (tp.Actor.Owner.Stances[args.SourceActor.Owner] == Stance.Ally && !tp.Trait.AlliedMissiles)
if (!tp.Actor.Owner.Stances[args.SourceActor.Owner].HasStance(tp.Trait.DeflectionStances))
return false;
return tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0;