Working on vehicle sync 4

This commit is contained in:
in0finite 2019-04-29 00:37:00 +02:00
parent f3eff67bdf
commit 63491e76ea

View file

@ -10,9 +10,11 @@ namespace SanAndreasUnity.Behaviours.Peds.States
{
public override void OnBecameActive() {
public override void OnBecameInactive()
{
base.OnBecameInactive();
}
public void EnterVehicle(Vehicle vehicle, Vehicle.Seat seat)
@ -35,10 +37,14 @@ namespace SanAndreasUnity.Behaviours.Peds.States
}
public override void OnSubmitPressed() {
public override void OnSubmitPressed()
{
// exit the vehicle
m_ped.ExitVehicle();
if (m_isServer)
m_ped.ExitVehicle();
else
base.OnSubmitPressed();
}
@ -46,6 +52,8 @@ namespace SanAndreasUnity.Behaviours.Peds.States
base.UpdateState();
// check if this is still active state ?
if (m_ped.IsDrivingVehicle)
this.UpdateWheelTurning ();