forked from UNLOZE/sm-plugins
SourceMod 1.10 and new OnEntitySpawned forward
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
#include <basic>
|
||||
#include "CConfig.inc"
|
||||
#include "CBoss.inc"
|
||||
|
||||
#include <sourcemod>
|
||||
#include <sdkhooks>
|
||||
#include <sdktools>
|
||||
@@ -359,7 +355,9 @@ public void OnMapStart()
|
||||
int entity = INVALID_ENT_REFERENCE;
|
||||
while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
|
||||
{
|
||||
OnEntitySpawned(entity);
|
||||
char sClassname[64];
|
||||
if(GetEntityClassname(entity, sClassname, sizeof(sClassname)))
|
||||
OnEntitySpawned(entity, sClassname);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,15 +385,7 @@ public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
|
||||
g_aHadOnce = new StringMap();
|
||||
}
|
||||
|
||||
public void OnEntityCreated(int entity, const char[] classname)
|
||||
{
|
||||
if(!g_aConfig)
|
||||
return;
|
||||
|
||||
SDKHook(entity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
}
|
||||
|
||||
public void OnEntitySpawned(int entity)
|
||||
public void OnEntitySpawned(int entity, const char[] classname)
|
||||
{
|
||||
if(!g_aConfig)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user