mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added check for driver's current vehicle when releasing from Stop waypoint in case the ped is not in a vehicle.
This commit is contained in:
parent
9ff7aabd9f
commit
0af97e2b2d
1 changed files with 9 additions and 6 deletions
|
|
@ -75,7 +75,10 @@ namespace SceneManager
|
|||
//Logger.Log($"Unstucking {Vehicle.Model.Name}");
|
||||
StoppedAtWaypoint = false;
|
||||
Rage.Native.NativeFunction.Natives.x260BE8F09E326A20(Vehicle, 0f, 1, true);
|
||||
Driver.Tasks.CruiseWithVehicle(5f);
|
||||
if (Driver.CurrentVehicle)
|
||||
{
|
||||
Driver.Tasks.CruiseWithVehicle(5f);
|
||||
}
|
||||
}
|
||||
Driver.Tasks.Clear();
|
||||
|
||||
|
|
@ -113,11 +116,11 @@ namespace SceneManager
|
|||
{
|
||||
if (CurrentWaypoint == null || Path == null)
|
||||
{
|
||||
Logger.Log($"CurrentWaypoint or Path are null");
|
||||
Game.LogTrivial($"CurrentWaypoint or Path are null");
|
||||
}
|
||||
else if (CurrentWaypoint?.Number != Path?.Waypoints.Count)
|
||||
{
|
||||
Logger.Log($"Dismissed from waypoint.");
|
||||
Game.LogTrivial($"Dismissed from waypoint.");
|
||||
SkipWaypoint = true;
|
||||
}
|
||||
else if (CurrentWaypoint?.Number == Path?.Waypoints.Count)
|
||||
|
|
@ -128,7 +131,7 @@ namespace SceneManager
|
|||
|
||||
void DismissFromPath()
|
||||
{
|
||||
Logger.Log($"Dismissing from path");
|
||||
Game.LogTrivial($"Dismissing from path");
|
||||
Dismissed = true;
|
||||
|
||||
// Check if the vehicle is near any of the path's collector waypoints
|
||||
|
|
@ -146,7 +149,7 @@ namespace SceneManager
|
|||
}
|
||||
else
|
||||
{
|
||||
Logger.Log($"Nearest collector is null");
|
||||
Game.LogTrivial($"Nearest collector is null");
|
||||
}
|
||||
|
||||
if (!Vehicle || !Driver)
|
||||
|
|
@ -157,7 +160,7 @@ namespace SceneManager
|
|||
if (!Directed)
|
||||
{
|
||||
Path.CollectedVehicles.Remove(this);
|
||||
Logger.Log($"{Vehicle.Model.Name} dismissed successfully.");
|
||||
Game.LogTrivial($"{Vehicle.Model.Name} dismissed successfully.");
|
||||
if (Driver)
|
||||
{
|
||||
if (Driver.GetAttachedBlip())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue