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)
|
public void OnEntityCreated(int iEntity, const char[] sClassname)
|
||||||
{
|
{
|
||||||
if (IsValidEntity(iEntity))
|
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||||
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
return;
|
||||||
|
|
||||||
|
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnEntitySpawned(int iEntity)
|
public void OnEntitySpawned(int iEntity)
|
||||||
{
|
{
|
||||||
if (g_bVoteFinished)
|
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char sTargetname[128];
|
char sTargetname[128];
|
||||||
|
Loading…
Reference in New Issue
Block a user