No. Just No. GTFO. Orders do NOT store cursors. That is all

This commit is contained in:
Bob
2009-11-25 19:44:38 +13:00
parent 390fc8f2d1
commit e9b87640bd
5 changed files with 43 additions and 27 deletions

View File

@@ -23,8 +23,7 @@ namespace OpenRa.Game.Traits
if (lmb) return null;
if (underCursor == null)
return OpenRa.Game.Order.Move(self, xy,
!Game.IsCellBuildable(xy, UnitMovementType.Foot));
return OpenRa.Game.Order.Move(self, xy);
return null;
}

View File

@@ -13,11 +13,9 @@ namespace OpenRa.Game.Traits
public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor)
{
if (lmb) return null;
if( xy != self.Location ) return null;
var factBuildingInfo = (UnitInfo.BuildingInfo)Rules.UnitInfo[ "fact" ];
return OpenRa.Game.Order.DeployMcv(self, !Game.CanPlaceBuilding(factBuildingInfo, xy - new int2(1,1), self, false));
return OpenRa.Game.Order.DeployMcv(self);
}
}
}

View File

@@ -34,8 +34,7 @@ namespace OpenRa.Game.Traits
if (xy == toCell) return null;
return OpenRa.Game.Order.Move( self, xy,
!Game.IsCellBuildable(xy, GetMovementType()) );
return OpenRa.Game.Order.Move( self, xy );
}
public IEnumerable<int2> OccupiedCells()