Small tweaks

This commit is contained in:
Sardelka 2022-08-13 16:59:09 +08:00
parent a7d64d241d
commit 609fd90561
3 changed files with 29 additions and 6 deletions

View File

@ -749,7 +749,7 @@ namespace RageCoop.Client
case 5:
if (MainPed.VehicleTryingToEnter!=CurrentVehicle.MainVehicle || MainPed.GetSeatTryingToEnter()!=Seat)
{
MainPed.Task.EnterVehicle(CurrentVehicle.MainVehicle,Seat,-1,1,EnterVehicleFlags.AllowJacking);
MainPed.Task.EnterVehicle(CurrentVehicle.MainVehicle,Seat,-1,5,EnterVehicleFlags.AllowJacking);
}
break;
case 6:

View File

@ -57,11 +57,7 @@ namespace RageCoop.Client
return 3;
}
if (ped.IsTaskActive(TaskType.CTaskExitVehicle))
{
return 6;
}
if (ped.IsInVehicle())
if (ped.IsSittingInVehicle())
{
return 4;
}
@ -69,6 +65,10 @@ namespace RageCoop.Client
{
return 5;
}
if (ped.IsTaskActive(TaskType.CTaskExitVehicle))
{
return 6;
}
return 0;
}

View File

@ -34,10 +34,33 @@ namespace RageCoop.Client
}
Game.DisableControlThisFrame(Control.FrontendPause);
Game.DisableControlThisFrame(Control.VehicleExit);
Game.DisableControlThisFrame(Control.Enter);
if (Main.Settings.DisableAlternatePause)
{
Game.DisableControlThisFrame(Control.FrontendPauseAlternate);
}
var P = Game.Player.Character;
if (Game.IsControlJustPressed(Control.VehicleExit))
{
if (P.IsInVehicle())
{
P.Task.LeaveVehicle();
}
else if (P.IsTaskActive(TaskType.CTaskMoveGoToVehicleDoor))
{
P.Task.ClearAll();
}
else
{
var v = World.GetClosestVehicle(P.Position, 10);
if (v!=null)
{
P.Task.EnterVehicle(v,VehicleSeat.Driver,-1,5, EnterVehicleFlags.AllowJacking);
}
}
}
// Sets a value that determines how aggressive the ocean waves will be.
// Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm.