fix NRE in IsDrivingVehicle

This commit is contained in:
in0finite 2019-07-11 23:13:57 +02:00
parent e9b944cad5
commit 269ffca20f

View file

@ -36,13 +36,13 @@ namespace SanAndreasUnity.Behaviours
}
}
public bool IsInVehicle { get { return CurrentVehicle != null; } }
public bool IsInVehicle { get { return this.CurrentVehicle != null; } }
public bool IsInVehicleSeat { get { return this.CurrentState != null && this.CurrentState.RepresentsState (typeof(VehicleSittingState)); } }
public bool IsDrivingVehicle { get { return this.IsInVehicleSeat && this.CurrentVehicleSeat.IsDriver && this.IsInVehicle; } }
public bool IsDrivingVehicle { get { return this.CurrentVehicleSeat != null && this.CurrentVehicleSeat.IsDriver; } }
public Vehicle.SeatAlignment CurrentVehicleSeatAlignment { get { return CurrentVehicleSeat.Alignment; } }
public Vehicle.SeatAlignment CurrentVehicleSeatAlignment { get { return this.CurrentVehicleSeat.Alignment; } }