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 darkademic committed Feb 19, 2024
1 parent 6bd995a commit 1ff5e3d
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 @@ -130,6 +130,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 1ff5e3d

Please sign in to comment.