From e07869e71f820d602de46db2d96f41fc04e89f41 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Sat, 19 Aug 2023 15:59:05 +0800 Subject: [PATCH] Autocarryall put down unit if destination is cancelled when picking up --- OpenRA.Mods.Common/Traits/AutoCarryall.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/AutoCarryall.cs b/OpenRA.Mods.Common/Traits/AutoCarryall.cs index 31ea1ba384..66c54c6e6a 100644 --- a/OpenRA.Mods.Common/Traits/AutoCarryall.cs +++ b/OpenRA.Mods.Common/Traits/AutoCarryall.cs @@ -192,8 +192,7 @@ namespace OpenRA.Mods.Common.Traits return true; var dropRange = carryall.Info.DropRange; - if (carryable.Destination != null) - QueueChild(new DeliverUnit(self, Target.FromCell(self.World, carryable.Destination.Value), dropRange, carryall.Info.TargetLineColor)); + QueueChild(new DeliverUnit(self, Target.FromCell(self.World, carryable.Destination ?? self.Location), dropRange, carryall.Info.TargetLineColor)); return true; }