From abd9926b8098cdd5d8e50d209d8ceb3942fabc25 Mon Sep 17 00:00:00 2001 From: "s3607057 (Angus Niven)" Date: Thu, 19 Sep 2019 15:50:09 +1000 Subject: [PATCH] Fixed bug that was misplacing the spawning area due to startX being changed between games in MapManager.asset. --- Assets/Scripts/Map Generation/MapManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Map Generation/MapManager.cs b/Assets/Scripts/Map Generation/MapManager.cs index 615e89d..7a1fccf 100644 --- a/Assets/Scripts/Map Generation/MapManager.cs +++ b/Assets/Scripts/Map Generation/MapManager.cs @@ -20,7 +20,8 @@ public class MapManager : ScriptableObject public List activeSections; //The list of sections that have been placed on the map (and not removed) MapSection lastSection; //Which map-section was most recently added? - float startX = -16.0f; //The x-position of the current start of the track + float startX; //The x-position of the current start of the track + float startXinit = -16.0f; float endX; //The x-position of the current end of the track int totalSections; //How many sections have been added? Including ones that have been deleted @@ -44,6 +45,7 @@ public class MapManager : ScriptableObject public void init() { sections = new List(); + startX = startXinit; endX = startX; totalSections = 0;