flying off map simplification

This commit is contained in:
Chris Forbes
2010-03-07 22:52:03 +13:00
parent 0ef228a6a5
commit 171cae1833
4 changed files with 42 additions and 24 deletions

View File

@@ -73,9 +73,8 @@ namespace OpenRA.Mods.RA
void FinishedDropping(Actor self)
{
// this kindof sucks, actually.
self.CancelActivity();
self.QueueActivity(new Fly(Util.CenterOfCell(self.World.ChooseRandomEdgeCell())));
self.QueueActivity(new FlyOffMap(20));
self.QueueActivity(new RemoveSelf());
}
}

View File

@@ -51,7 +51,6 @@ namespace OpenRA.Mods.RA
Game.controller.CancelInputMode();
var enterCell = self.World.ChooseRandomEdgeCell();
var exitCell = self.World.ChooseRandomEdgeCell();
var plane = self.World.CreateActor("U2", enterCell, self.Owner);
plane.CancelActivity();
@@ -59,7 +58,7 @@ namespace OpenRA.Mods.RA
plane.QueueActivity(new CallFunc(
() => Owner.Shroud.Explore(Owner.World, order.TargetLocation,
(Info as SpyPlanePowerInfo).Range)));
plane.QueueActivity(new Fly(Util.CenterOfCell(exitCell)));
plane.QueueActivity(new FlyOffMap(20));
plane.QueueActivity(new RemoveSelf());
}
}