Skip to content

Commit

Permalink
Land activity: fix bug which causes crash in Aircraft.AddInflunce()
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldgg2 authored and PunkPun committed Feb 19, 2024
1 parent a054d21 commit 3760b14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OpenRA.Mods.Common/Activities/Air/Land.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 3760b14

Please sign in to comment.