From 351c23169352df5856a5edd540da0bbe3643bfd5 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Mon, 5 Sep 2016 19:24:26 +0200 Subject: [PATCH] Use the yield reservation logic for helicopters as well. Oops. --- OpenRA.Mods.Common/Activities/Air/ResupplyAircraft.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Activities/Air/ResupplyAircraft.cs b/OpenRA.Mods.Common/Activities/Air/ResupplyAircraft.cs index e2d7ba11a3..dd3df1e8d8 100644 --- a/OpenRA.Mods.Common/Activities/Air/ResupplyAircraft.cs +++ b/OpenRA.Mods.Common/Activities/Air/ResupplyAircraft.cs @@ -49,9 +49,11 @@ namespace OpenRA.Mods.Common.Activities else { // Helicopters should take off from their helipad immediately after resupplying. - // HACK: NextActivity needs to be appended here because otherwise TakeOff does stupid things. + // HACK: Append NextActivity to TakeOff to avoid moving to the Rallypoint (if NextActivity is non-null). inner = ActivityUtils.SequenceActivities( - aircraft.GetResupplyActivities(host).Append(new TakeOff(self)).Append(NextActivity).ToArray()); + aircraft.GetResupplyActivities(host) + .Append(new CallFunc(() => aircraft.MayYieldReservation = true)) + .Append(new TakeOff(self)).Append(NextActivity).ToArray()); } } else