don't drop crates in stupid places
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public void Tick(Actor self)
|
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();
|
var collector = self.World.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(cell).FirstOrDefault();
|
||||||
if (collector != null)
|
if (collector != null)
|
||||||
{
|
{
|
||||||
@@ -88,11 +88,13 @@ namespace OpenRA.Mods.RA
|
|||||||
public int2 TopLeft {get { return Location; }}
|
public int2 TopLeft {get { return Location; }}
|
||||||
int2[] noCells = new int2[] { };
|
int2[] noCells = new int2[] { };
|
||||||
public IEnumerable<int2> OccupiedCells() { return noCells; }
|
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 MovementCostForCell(Actor self, int2 cell) { return 0; }
|
||||||
public float MovementSpeedForCell(Actor self, int2 cell) { return 1; }
|
public float MovementSpeedForCell(Actor self, int2 cell) { return 1; }
|
||||||
public IEnumerable<float2> GetCurrentPath(Actor self) { return new float2[] {}; }
|
public IEnumerable<float2> GetCurrentPath(Actor self) { return new float2[] {}; }
|
||||||
|
|
||||||
public void SetPosition(Actor self, int2 cell)
|
public void SetPosition(Actor self, int2 cell)
|
||||||
{
|
{
|
||||||
Location = cell;
|
Location = cell;
|
||||||
|
|||||||
Reference in New Issue
Block a user