mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added null check for current waypoint when tasks assigned. Removed unstucking code.
This commit is contained in:
parent
9ebdc14c13
commit
277a169cdf
1 changed files with 8 additions and 8 deletions
|
|
@ -17,7 +17,14 @@ namespace SceneManager
|
|||
}
|
||||
|
||||
collectedVehicle.Path = path;
|
||||
if(currentWaypoint != null)
|
||||
{
|
||||
collectedVehicle.CurrentWaypoint = currentWaypoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
collectedVehicle.CurrentWaypoint = path.Waypoints[0];
|
||||
}
|
||||
|
||||
if (currentWaypoint != null && collectedVehicle.Directed)
|
||||
{
|
||||
|
|
@ -27,13 +34,6 @@ namespace SceneManager
|
|||
{
|
||||
GameFiber.Yield();
|
||||
}
|
||||
//if (collectedVehicle.StoppedAtWaypoint)
|
||||
//{
|
||||
// Logger.Log($"Unstucking {collectedVehicle.Vehicle.Model.Name}");
|
||||
// collectedVehicle.StoppedAtWaypoint = false;
|
||||
// Rage.Native.NativeFunction.Natives.x260BE8F09E326A20(collectedVehicle.Vehicle, 0f, 1, true);
|
||||
// collectedVehicle.Driver.Tasks.CruiseWithVehicle(5f);
|
||||
//}
|
||||
collectedVehicle.Driver.Tasks.Clear();
|
||||
AssignTasksForDirectedDriver(acceptedDistance);
|
||||
LoopWhileDrivingToDirectedWaypoint(acceptedDistance);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue