PlayerRankings: Add some checks.
This commit is contained in:
parent
edd8fd85d2
commit
ce3804b3d5
@ -391,7 +391,7 @@ public Action UpdateCrowns(Handle timer)
|
||||
if (g_bEngineCSGO)
|
||||
return;
|
||||
|
||||
if (IsValidEntity(g_iCrownEntity))
|
||||
if (IsValidEntity(g_iCrownEntity) && IsValidEntity(g_iCrownParent) && IsClientInGame(g_iCrownParent))
|
||||
{
|
||||
float fAngles[3];
|
||||
GetClientAbsAngles(g_iCrownParent, fAngles);
|
||||
@ -402,7 +402,7 @@ public Action UpdateCrowns(Handle timer)
|
||||
TeleportEntity(g_iCrownEntity, NULL_VECTOR, fAngles, NULL_VECTOR);
|
||||
}
|
||||
|
||||
if (IsValidEntity(g_iSkullEntity))
|
||||
if (IsValidEntity(g_iSkullEntity) && IsValidEntity(g_iSkullParent) && IsClientInGame(g_iSkullParent))
|
||||
{
|
||||
float fAngles[3];
|
||||
GetClientAbsAngles(g_iSkullParent, fAngles);
|
||||
|
Loading…
Reference in New Issue
Block a user