MakoVote: Check if entity still valid PostSpawn.
Error spam galore, finally decided to fix it.
This commit is contained in:
parent
ce6d2a1d0b
commit
cead438b21
@ -65,13 +65,15 @@ public Action VerifyMap()
|
||||
|
||||
public void OnEntityCreated(int iEntity, const char[] sClassname)
|
||||
{
|
||||
if (IsValidEntity(iEntity))
|
||||
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||
return;
|
||||
|
||||
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
}
|
||||
|
||||
public void OnEntitySpawned(int iEntity)
|
||||
{
|
||||
if (g_bVoteFinished)
|
||||
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||
return;
|
||||
|
||||
char sTargetname[128];
|
||||
|
Loading…
Reference in New Issue
Block a user