Fixed main path waypoints not getting mirrored in mirrored levels (cherry-picked from 295fc31).

This commit is contained in:
Joonas Rikkonen
2018-09-21 12:43:41 +03:00
parent e578cbc077
commit c4c18fbfd7

View File

@@ -356,7 +356,7 @@ namespace Barotrauma
foreach (InterestingPosition positionOfInterest in positionsOfInterest)
{
WayPoint wayPoint = new WayPoint(
mirror ? new Vector2(borders.X - positionOfInterest.Position.X, positionOfInterest.Position.Y) : positionOfInterest.Position,
positionOfInterest.Position,
SpawnType.Enemy,
submarine: null);
}
@@ -477,6 +477,11 @@ namespace Barotrauma
positionsOfInterest[i].PositionType);
}
foreach (WayPoint waypoint in WayPoint.WayPointList)
{
waypoint.Move(new Vector2((borders.Width / 2 - waypoint.Position.X) * 2, 0.0f));
}
startPosition.X = borders.Width - startPosition.X;
endPosition.X = borders.Width - endPosition.X;
}