Remove ActorMap.ActorsInWorld.

Prefer the more direct and efficient query on World.Actors instead.
This commit is contained in:
RoosterDragon
2015-11-28 21:42:06 +00:00
parent 912a0630e2
commit c0286bb147
3 changed files with 2 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Scripting
if (!Context.World.Map.Rules.Actors.TryGetValue(type, out ai))
throw new LuaException("Unknown actor type '{0}'".F(type));
result.AddRange(Player.World.ActorMap.ActorsInWorld()
result.AddRange(Player.World.Actors
.Where(actor => actor.Owner == Player && !actor.IsDead && actor.IsInWorld && actor.Info.Name == ai.Name));
return result.ToArray();