Autocarryall put down unit if destination is cancelled when picking up

This commit is contained in:
dnqbob
2023-08-19 15:59:05 +08:00
committed by Gustas
parent c9dfb215ae
commit e07869e71f

View File

@@ -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;
}