mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-30 07:50:22 +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()
|
public static Transform GetSpawnFocusPos()
|
||||||
{
|
{
|
||||||
if (Ped.Instance)
|
var ped = Ped.Instance;
|
||||||
return Ped.Instance.transform;
|
if (ped != null)
|
||||||
|
return ped.transform;
|
||||||
|
|
||||||
if (Camera.main)
|
var cam = Camera.main;
|
||||||
return Camera.main.transform;
|
if (cam != null)
|
||||||
|
return cam.transform;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue