mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 14:00:17 +00:00
...
This commit is contained in:
parent
fcdefaf1c0
commit
566f1ab7f6
1 changed files with 6 additions and 4 deletions
|
@ -58,11 +58,13 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
public static Transform GetSpawnFocusPos()
|
||||
{
|
||||
if (Ped.Instance)
|
||||
return Ped.Instance.transform;
|
||||
var ped = Ped.Instance;
|
||||
if (ped != null)
|
||||
return ped.transform;
|
||||
|
||||
if (Camera.main)
|
||||
return Camera.main.transform;
|
||||
var cam = Camera.main;
|
||||
if (cam != null)
|
||||
return cam.transform;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue