mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 12:33:02 +00:00
fix NRE in IsDrivingVehicle
This commit is contained in:
parent
e9b944cad5
commit
269ffca20f
1 changed files with 3 additions and 3 deletions
|
@ -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 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; } }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue