Support multiple ITargetable traits

This commit is contained in:
atlimit8
2015-07-13 15:22:39 -05:00
parent 4bd34e3ed3
commit f5c3575c5a
13 changed files with 39 additions and 38 deletions

View File

@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Orders
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor)
{
return target.TraitsImplementing<ITargetable>().Any(t => t.TargetTypes.Intersect(targetTypes).Any());
return target.TraitsImplementing<ITargetable>().Any(t => t.IsTraitEnabled() && t.TargetTypes.Intersect(targetTypes).Any());
}
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)