UnitInfo.Selectable

This commit is contained in:
Chris Forbes
2009-12-03 19:24:35 +13:00
parent cf54a47b0c
commit 5c923c8496
4 changed files with 28 additions and 23 deletions

View File

@@ -83,7 +83,10 @@ namespace OpenRa.Game
if (!Rules.Map.IsInMap(xy.X, xy.Y))
return null;
var underCursor = Game.UnitInfluence.GetUnitAt( xy ) ?? Game.BuildingInfluence.GetBuildingAt( xy );
var underCursor = Game.UnitInfluence.GetUnitAt( xy )
?? Game.BuildingInfluence.GetBuildingAt( xy );
if (underCursor != null && !underCursor.unitInfo.Selectable)
underCursor = null;
return traits.WithInterface<Traits.IOrder>()
.Select( x => x.IssueOrder( this, xy, lmb, underCursor ) )