mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
fix possible NRE
This commit is contained in:
parent
0127b0d392
commit
7f6ca3f4aa
1 changed files with 3 additions and 1 deletions
|
@ -658,8 +658,10 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
if (this.GunFlash != null)
|
||||
firePos = this.GunFlash.transform.position;
|
||||
else
|
||||
else if (this.Data.gunData != null)
|
||||
firePos = this.transform.TransformPoint (this.Data.gunData.fireOffset);
|
||||
else
|
||||
firePos = this.transform.position;
|
||||
|
||||
return firePos;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue