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

@@ -133,7 +133,7 @@ namespace OpenRA.Mods.RA
yield break;
}
var underCursor = world.ScreenMap.ActorsAt(Game.viewport.ViewToWorldPx(mi.Location))
var underCursor = world.ScreenMap.ActorsAt(mi)
.Where(a => !world.FogObscures(a))
.OrderByDescending(a => a.Info.Traits.Contains<SelectableInfo>()
? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue)