removing some old dumb stuff
This commit is contained in:
@@ -104,8 +104,7 @@ namespace OpenRA
|
|||||||
if (dirs[d] != 0)
|
if (dirs[d] != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int2 cell = world.OffsetCell(topLeft, i, d);
|
int2 cell = topLeft + i * vecs[d];
|
||||||
|
|
||||||
if (world.IsCellBuildable(cell, bi.WaterBound ? UnitMovementType.Float : UnitMovementType.Wheel, null))
|
if (world.IsCellBuildable(cell, bi.WaterBound ? UnitMovementType.Float : UnitMovementType.Wheel, null))
|
||||||
continue; // Cell is empty; continue search
|
continue; // Cell is empty; continue search
|
||||||
|
|
||||||
|
|||||||
@@ -127,26 +127,6 @@ namespace OpenRA
|
|||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int2 OffsetCell(this World world, int2 cell, int step, int dir)
|
|
||||||
{
|
|
||||||
switch (dir)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
cell.X += step;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
cell.Y += step;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
cell.X -= step;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
cell.Y -= step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return cell;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 topLeft, Actor toIgnore)
|
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 topLeft, Actor toIgnore)
|
||||||
{
|
{
|
||||||
var res = world.WorldActor.traits.Get<ResourceLayer>();
|
var res = world.WorldActor.traits.Get<ResourceLayer>();
|
||||||
|
|||||||
Reference in New Issue
Block a user