Land activity: fix bug which causes crash in Aircraft.AddInflunce()

Fixes #21302
This commit is contained in:
michaeldgg2
2024-02-17 10:52:44 +01:00
committed by Gustas
parent a054d2115d
commit 3760b14235

View File

@@ -131,6 +131,9 @@ namespace OpenRA.Mods.Common.Activities
target = Target.FromCell(self.World, newLocation.Value);
targetPosition = target.CenterPosition + offset;
landingCell = self.World.Map.CellContaining(targetPosition);
if ((targetPosition - pos).LengthSquared == 0)
return true;
}
}