Prevent bogus attackmove on take-off.

This commit is contained in:
tovl
2019-08-30 19:57:50 +02:00
committed by reaperrr
parent 78d7f79817
commit 5787f74af9
3 changed files with 5 additions and 29 deletions

View File

@@ -521,10 +521,9 @@ namespace OpenRA.Mods.Common.Traits
if (takeOff && self.World.Map.DistanceAboveTerrain(CenterPosition).Length <= LandAltitude.Length)
{
self.QueueActivity(new TakeOff(self));
if (rp != null)
self.QueueActivity(new TakeOff(self, Target.FromCell(self.World, rp.Location)));
else
self.QueueActivity(new TakeOff(self));
self.QueueActivity(new AttackMoveActivity(self, () => MoveTo(rp.Location, null, targetLineColor: Color.OrangeRed)));
}
}