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

Added VehicleManeuver.GoForwardWithCustomSteeringAngle after each driving task to stop AI from braking at each waypoint.

This commit is contained in:
Rich Dunne 2020-08-30 10:06:46 -06:00
parent 54c2bd8c12
commit 98f7efe647

View file

@ -57,6 +57,7 @@ namespace SceneManager
if (waypoints.ElementAtOrDefault(nextWaypoint) != null && !collectedVehicle.StoppedAtWaypoint) if (waypoints.ElementAtOrDefault(nextWaypoint) != null && !collectedVehicle.StoppedAtWaypoint)
{ {
collectedVehicle.Vehicle.Driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)263043, 2f).WaitForCompletion(); collectedVehicle.Vehicle.Driver.Tasks.DriveToPosition(waypoints[nextWaypoint].Position, waypoints[nextWaypoint].Speed, (VehicleDrivingFlags)263043, 2f).WaitForCompletion();
collectedVehicle.Vehicle.Driver.Tasks.PerformDrivingManeuver(collectedVehicle.Vehicle, VehicleManeuver.GoForwardWithCustomSteeringAngle, 3);
} }
if (waypoints.ElementAtOrDefault(nextWaypoint) != null && waypoints[nextWaypoint].DrivingFlag == VehicleDrivingFlags.StopAtDestination) if (waypoints.ElementAtOrDefault(nextWaypoint) != null && waypoints[nextWaypoint].DrivingFlag == VehicleDrivingFlags.StopAtDestination)
@ -95,6 +96,10 @@ namespace SceneManager
cv.Vehicle.Driver.Dismiss(); cv.Vehicle.Driver.Dismiss();
cv.Vehicle.Driver.Tasks.Clear(); cv.Vehicle.Driver.Tasks.Clear();
cv.Vehicle.Driver.BlockPermanentEvents = false; cv.Vehicle.Driver.BlockPermanentEvents = false;
if (cv.Vehicle.Driver.GetAttachedBlip())
{
cv.Vehicle.Driver.GetAttachedBlip().Delete();
}
cv.Vehicle.Driver.IsPersistent = false; cv.Vehicle.Driver.IsPersistent = false;
cv.Vehicle.Dismiss(); cv.Vehicle.Dismiss();