From 3760b14235d4e70e9c89e4122d73f0ab9298c8ff Mon Sep 17 00:00:00 2001 From: michaeldgg2 <119738087+michaeldgg2@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:52:44 +0100 Subject: [PATCH] Land activity: fix bug which causes crash in Aircraft.AddInflunce() Fixes #21302 --- OpenRA.Mods.Common/Activities/Air/Land.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Activities/Air/Land.cs b/OpenRA.Mods.Common/Activities/Air/Land.cs index a4fc45a79ce5..73fcfa15b324 100644 --- a/OpenRA.Mods.Common/Activities/Air/Land.cs +++ b/OpenRA.Mods.Common/Activities/Air/Land.cs @@ -131,6 +131,9 @@ public override bool Tick(Actor self) target = Target.FromCell(self.World, newLocation.Value); targetPosition = target.CenterPosition + offset; landingCell = self.World.Map.CellContaining(targetPosition); + + if ((targetPosition - pos).LengthSquared == 0) + return true; } }