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

Removed unnecessary else statements, changed Z-height for waypoint currently being edited. Added condition for drawing edit waypoint to ensure it's only changing the waypoint markers for the selected path.

This commit is contained in:
Rich Dunne 2020-09-15 13:50:02 -06:00
parent 2241e107de
commit f2909ef6a8
2 changed files with 12 additions and 27 deletions

View file

@ -77,11 +77,11 @@ namespace SceneManager
Logger.Log($"{vehicle.Model.Name} is driving to waypoint {waypoints[nextWaypoint].Number}");
if (waypoints[nextWaypoint].DrivingFlag == VehicleDrivingFlags.IgnorePathFinding)
{
collectedVehicle.Driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)17040299, acceptedDistance);
driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)17040299, acceptedDistance);
}
else
{
collectedVehicle.Driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)263075, acceptedDistance);
driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)263075, acceptedDistance);
}
LoopWhileDrivingToWaypoint(nextWaypoint, acceptedDistance);