mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-25 21:40:19 +00:00
Fix NRE caused by updating camera in LateUpdate()
This commit is contained in:
parent
669daa23be
commit
344318f558
2 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
Vector3 castDir = -m_ped.Camera.transform.forward;
|
||||
|
||||
// use distance from gun aiming offset ?
|
||||
if (m_ped.CurrentWeapon.GunAimingOffset != null)
|
||||
if (m_ped.CurrentWeapon != null && m_ped.CurrentWeapon.GunAimingOffset != null)
|
||||
{
|
||||
// Vector3 desiredCameraPos = this.transform.TransformPoint (- _player.CurrentWeapon.GunAimingOffset.Aim) + Vector3.up * .5f;
|
||||
// Vector3 desiredCameraPos = this.transform.TransformPoint( new Vector3(0.8f, 1.0f, -1) );
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
- adapt states:
|
||||
|
||||
- send button input events to server: crouch,
|
||||
- send button input events to server:
|
||||
|
||||
- stats window
|
||||
|
||||
|
|
Loading…
Reference in a new issue