Remove *PxPosition from IOccupySpace/IPositionable.

This commit is contained in:
Paul Chote
2013-07-21 12:17:40 +12:00
parent 19165d259d
commit 6a435752fd
12 changed files with 19 additions and 51 deletions

View File

@@ -205,7 +205,7 @@ namespace OpenRA.Mods.RA.Move
if (init.Contains<LocationInit>())
{
this.__fromCell = this.__toCell = init.Get<LocationInit, CPos>();
this.PxPosition = PPos.FromWPos(fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
SetVisualPosition(self, fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
}
this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : info.InitialFacing;
@@ -215,15 +215,7 @@ namespace OpenRA.Mods.RA.Move
public void SetPosition(Actor self, CPos cell)
{
SetLocation(cell,fromSubCell, cell,fromSubCell);
PxPosition = PPos.FromWPos(fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
FinishedMoving(self);
}
public void SetPxPosition(Actor self, PPos px)
{
var cell = px.ToCPos();
SetLocation(cell,fromSubCell, cell,fromSubCell);
PxPosition = px;
SetVisualPosition(self, fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
FinishedMoving(self);
}
@@ -235,7 +227,10 @@ namespace OpenRA.Mods.RA.Move
public void SetPosition(Actor self, WPos pos)
{
// TODO: Handle altitude
SetPxPosition(self, PPos.FromWPos(pos));
var cell = pos.ToCPos();
SetLocation(cell,fromSubCell, cell,fromSubCell);
PxPosition = PPos.FromWPos(pos);
FinishedMoving(self);
}
public void SetVisualPosition(Actor self, WPos pos)