don't drop crates in stupid places

This commit is contained in:
Chris Forbes
2010-07-20 17:59:42 +12:00
parent 416e892897
commit b3aaacf16b

View File

@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA
public void Tick(Actor self)
{
var cell = ((1/24f) * self.CenterLocation).ToInt2();
var cell = Util.CellContaining(self.CenterLocation);
var collector = self.World.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(cell).FirstOrDefault();
if (collector != null)
{
@@ -89,10 +89,12 @@ namespace OpenRA.Mods.RA
int2[] noCells = new int2[] { };
public IEnumerable<int2> OccupiedCells() { return noCells; }
public bool CanEnterCell(int2 location) { return true; }
public bool CanEnterCell(int2 location) { return self.World.GetTerrainInfo(location).Buildable; }
public float MovementCostForCell(Actor self, int2 cell) { return 0; }
public float MovementSpeedForCell(Actor self, int2 cell) { return 1; }
public IEnumerable<float2> GetCurrentPath(Actor self) { return new float2[] {}; }
public void SetPosition(Actor self, int2 cell)
{
Location = cell;