This commit is contained in:
in0finite 2021-07-20 01:13:38 +02:00
parent fcdefaf1c0
commit 566f1ab7f6

View file

@ -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;
}