Add ScreenMap.ActorsAt(MouseInput) overload.

This commit is contained in:
Paul Chote
2013-09-27 17:58:44 +12:00
parent 0b560bfc6e
commit 1ca9c90565
6 changed files with 11 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ namespace OpenRA.Mods.RA
static IEnumerable<Actor> FriendlyGuardableUnits(World world, MouseInput mi)
{
return world.ScreenMap.ActorsAt(Game.viewport.ViewToWorldPx(mi.Location))
return world.ScreenMap.ActorsAt(mi)
.Where(a => !world.FogObscures(a) && !a.IsDead() &&
a.AppearsFriendlyTo(world.LocalPlayer.PlayerActor) &&
a.HasTrait<Guardable>());