Fixed submarine waypoints getting mirrored in mirrored levels (cherry-picked from c785732)

This commit is contained in:
Joonas Rikkonen
2018-09-21 14:03:49 +03:00
parent c4c18fbfd7
commit bff2852cb6
@@ -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;