From c4c18fbfd7d478483ed9674ec89147c4e5a12719 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 21 Sep 2018 12:43:41 +0300 Subject: [PATCH] Fixed main path waypoints not getting mirrored in mirrored levels (cherry-picked from 295fc31). --- Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs b/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs index 35ac625d3..3ab2f1fe5 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Levels/Level.cs @@ -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; }