Intermediate crushable-behavior checkin; Muliple units per cell in UIM; Crushable TraitInterface; Crushable units are taken into account in pathfinding; Crashes when trying to crush a unit

This commit is contained in:
Paul Chote
2009-12-22 22:37:11 -08:00
parent 980ce2df56
commit 4667679f12
13 changed files with 146 additions and 43 deletions

View File

@@ -85,8 +85,10 @@ namespace OpenRa.Game
if (!Rules.Map.IsInMap(xy.X, xy.Y))
return null;
var underCursor = Game.UnitInfluence.GetUnitAt( xy )
// HACK: Get the first unit in the cell
// This will need to be updated for multiple-infantry-in-a-cell
var underCursor = Game.UnitInfluence.GetUnitsAt( xy ).FirstOrDefault()
?? Game.BuildingInfluence.GetBuildingAt( xy );
if (underCursor != null && !underCursor.Info.Selectable)