No. Just No. GTFO. Orders do NOT store cursors. That is all
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user