Refactored in new enum SubCell

This commit is contained in:
atlimit8
2014-08-17 02:35:54 -05:00
parent 27ad5208fb
commit 63c28ee4d7
17 changed files with 121 additions and 110 deletions

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA
{
[Sync] readonly CPos location;
[Sync] readonly WPos position;
readonly IEnumerable<Pair<CPos, int>> occupied;
readonly IEnumerable<Pair<CPos, SubCell>> occupied;
public Immobile(ActorInitializer init, ImmobileInfo info)
{
@@ -32,14 +32,14 @@ namespace OpenRA.Mods.RA
position = init.world.Map.CenterOfCell(location);
if (info.OccupiesSpace)
occupied = new [] { Pair.New(TopLeft, 0) };
occupied = new [] { Pair.New(TopLeft, SubCell.FullCell) };
else
occupied = new Pair<CPos, int>[0];
occupied = new Pair<CPos, SubCell>[0];
}
public CPos TopLeft { get { return location; } }
public WPos CenterPosition { get { return position; } }
public IEnumerable<Pair<CPos, int>> OccupiedCells() { return occupied; }
public IEnumerable<Pair<CPos, SubCell>> OccupiedCells() { return occupied; }
public void AddedToWorld(Actor self)
{