forked from UNLOZE/sm-plugins
SourceMod 1.10 and new OnEntitySpawned forward
This commit is contained in:
@@ -227,7 +227,9 @@ stock bool LoadConfig()
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,18 +270,7 @@ public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnEntityCreated(int entity, const char[] sClassname)
|
||||
{
|
||||
if (Entity_IsValid(entity))
|
||||
{
|
||||
SDKHook(entity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnEntitySpawned(int entity)
|
||||
public void OnEntitySpawned(int entity, const char[] classname)
|
||||
{
|
||||
if (Entity_IsValid(entity) && g_hArray_Configs.Length)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user