Add SimpleTeleport for non-chrono jumps (used in scripts etc)

This commit is contained in:
Chris Forbes
2012-07-01 14:05:21 +12:00
parent 109546d20f
commit 0a4669b925
2 changed files with 14 additions and 1 deletions

View File

@@ -45,4 +45,17 @@ namespace OpenRA.Mods.RA.Activities
return NextActivity;
}
}
public class SimpleTeleport : Activity
{
CPos destination;
public SimpleTeleport(CPos destination) { this.destination = destination; }
public override Activity Tick(Actor self)
{
self.Trait<ITeleportable>().SetPosition(self, destination);
return NextActivity;
}
}
}