1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 15:40:29 +01:00

Lines are now only drawn between waypoint markers under the same conditions that waypoint markers are drawn

This commit is contained in:
Rich Dunne 2020-10-23 06:23:50 -06:00
parent 0af97e2b2d
commit adf40c25ec

View file

@ -81,9 +81,9 @@ namespace SceneManager
{ {
GameFiber.StartNew(() => GameFiber.StartNew(() =>
{ {
while (SettingsMenu.threeDWaypoints.Checked) while(true)
{ {
if (MenuManager.menuPool.IsAnyMenuOpen()) if (Settings.Enable3DWaypoints && (State == State.Finished && MenuManager.menuPool.IsAnyMenuOpen()) || (State == State.Creating && PathCreationMenu.pathCreationMenu.Visible))
{ {
for (int i = 0; i < Waypoints.Count; i++) for (int i = 0; i < Waypoints.Count; i++)
{ {
@ -133,7 +133,6 @@ namespace SceneManager
internal void LoopWaypointCollection() internal void LoopWaypointCollection()
{ {
uint lastProcessTime = Game.GameTime; // Store the last time the full loop finished; this is a value in ms uint lastProcessTime = Game.GameTime; // Store the last time the full loop finished; this is a value in ms
int timeBetweenChecks = 1000; // How many ms to wait between outer loops
int yieldAfterChecks = 50; // How many calculations to do before yielding int yieldAfterChecks = 50; // How many calculations to do before yielding
while (PathMainMenu.paths.Contains(this)) while (PathMainMenu.paths.Contains(this))
{ {
@ -177,7 +176,7 @@ namespace SceneManager
{ {
var collectedVehicle = new CollectedVehicle(vehicle, this); var collectedVehicle = new CollectedVehicle(vehicle, this);
CollectedVehicles.Add(collectedVehicle); CollectedVehicles.Add(collectedVehicle);
Logger.Log($"Added {vehicle.Model.Name} to collection from path {Number} waypoint {1}."); Game.LogTrivial($"Added {vehicle.Model.Name} to collection from path {Number} waypoint {1}.");
return collectedVehicle; return collectedVehicle;
} }