queries dies

This commit is contained in:
Chris Forbes
2011-03-17 22:05:53 +13:00
parent caa52b2780
commit a3994df925
34 changed files with 52 additions and 66 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.RA
if (!Cloak.Cloaked || self.Owner == byActor.Owner || self.Owner.Stances[byActor.Owner] == Stance.Ally)
return true;
return self.World.Queries.WithTrait<DetectCloaked>().Any(a => (self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get<DetectCloakedInfo>().Range);
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => (self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get<DetectCloakedInfo>().Range);
}
public virtual string[] TargetTypes { get { return info.TargetTypes; } }