Revert "add IHasLocation"

This reverts commit 699b4b1154.
This commit is contained in:
Chris Forbes
2010-09-28 07:43:49 +13:00
parent a3c0448e15
commit f402ec7898
31 changed files with 105 additions and 136 deletions

View File

@@ -81,11 +81,17 @@ namespace OpenRA.Traits
public int InitialFacing { get { return Info.InitialFacing; } }
[Sync]
public int2 PxPosition { get; set; }
public int2 fromCell
{
get { return __fromCell; }
}
[Sync]
public int2 fromCell { get { return __fromCell; } }
[Sync]
public int2 toCell { get { return __toCell; } }
public int2 toCell
{
get { return __toCell; }
}
[Sync]
public int PathHash; // written by Move.EvalPath, to temporarily debug this crap.
@@ -110,7 +116,6 @@ namespace OpenRA.Traits
if (init.Contains<LocationInit>())
{
this.__fromCell = this.__toCell = init.Get<LocationInit,int2>();
this.PxPosition = Util.CenterOfCell( fromCell );
AddInfluence();
}
@@ -121,14 +126,7 @@ namespace OpenRA.Traits
public void SetPosition(Actor self, int2 cell)
{
SetLocation( cell, cell );
PxPosition = Util.CenterOfCell(fromCell);
}
public void SetPxPosition( Actor self, int2 px )
{
var cell = Util.CellContaining( px );
SetLocation( cell, cell );
PxPosition = px;
self.CenterLocation = Util.CenterOfCell(fromCell);
}
public int OrderPriority(Actor self, int2 xy, MouseInput mi, Actor underCursor)