Allow Chronoshifted/paradropped units to pick up crates, etc.

This commit is contained in:
Paul Chote
2010-11-24 15:55:41 +13:00
parent 08c9c1a92f
commit d0466714c8
2 changed files with 3 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA.Activities
public override IActivity Tick(Actor self) public override IActivity Tick(Actor self)
{ {
self.TraitsImplementing<IMove>().FirstOrDefault().SetPosition(self, destination); self.TraitsImplementing<ITeleportable>().FirstOrDefault().SetPosition(self, destination);
return NextActivity; return NextActivity;
} }
} }

View File

@@ -129,6 +129,7 @@ namespace OpenRA.Mods.RA.Move
{ {
SetLocation( cell, cell ); SetLocation( cell, cell );
PxPosition = Util.CenterOfCell(fromCell); PxPosition = Util.CenterOfCell(fromCell);
FinishedMoving(self);
} }
public void SetPxPosition( Actor self, int2 px ) public void SetPxPosition( Actor self, int2 px )
@@ -136,6 +137,7 @@ namespace OpenRA.Mods.RA.Move
var cell = Util.CellContaining( px ); var cell = Util.CellContaining( px );
SetLocation( cell, cell ); SetLocation( cell, cell );
PxPosition = px; PxPosition = px;
FinishedMoving(self);
} }
public IEnumerable<IOrderTargeter> Orders { get { yield return new MoveOrderTargeter( Info ); } } public IEnumerable<IOrderTargeter> Orders { get { yield return new MoveOrderTargeter( Info ); } }