@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user