diff --git a/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs b/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs index 3ab2f1fe5..ec25608db 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs @@ -479,6 +479,7 @@ namespace Barotrauma foreach (WayPoint waypoint in WayPoint.WayPointList) { + if (waypoint.Submarine != null) continue; waypoint.Move(new Vector2((borders.Width / 2 - waypoint.Position.X) * 2, 0.0f)); } @@ -592,7 +593,7 @@ namespace Barotrauma { if (wp.SpawnType != SpawnType.Path) continue; - float dist =Math.Abs(cell.Center.X - wp.WorldPosition.X); + float dist = Math.Abs(cell.Center.X - wp.WorldPosition.X); if (closestWayPoint == null || dist < closestDist) { closestDist = dist;