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 db3145ed5e
commit 4dec1fe430

View File

@@ -128,10 +128,7 @@ namespace OpenRA.Mods.Common.Traits
return true;
var dropRange = carryall.Info.DropRange;
var destination = carryable.Destination;
if (destination != null)
self.QueueActivity(true, new DeliverUnit(self, Target.FromCell(self.World, destination.Value), dropRange, carryall.Info.TargetLineColor));
self.QueueActivity(true, new DeliverUnit(self, Target.FromCell(self.World, carryable.Destination ?? self.Location), dropRange, carryall.Info.TargetLineColor));
return true;
}
}