diff --git a/extensions/sdkhooks/extension.cpp b/extensions/sdkhooks/extension.cpp index 04b115a4..d1c0ac64 100644 --- a/extensions/sdkhooks/extension.cpp +++ b/extensions/sdkhooks/extension.cpp @@ -1831,19 +1831,12 @@ void SDKHooks::HandleEntityCreated(CBaseEntity *pEntity, int index, cell_t ref) void SDKHooks::HandleEntitySpawned(CBaseEntity *pEntity, int index, cell_t ref) { - if (g_pOnEntitySpawned->GetFunctionCount() || m_EntListeners.size()) + if (g_pOnEntitySpawned->GetFunctionCount()) { const char *pName = gamehelpers->GetEntityClassname(pEntity); if (!pName) pName = ""; - // Send OnEntitySpawned to SM listeners - for (SourceHook::List::iterator iter = m_EntListeners.begin(); iter != m_EntListeners.end(); iter++) - { - ISMEntityListener *pListener = (*iter); - pListener->OnEntitySpawned(pEntity, pName); - } - // Call OnEntitySpawned forward if (g_pOnEntitySpawned->GetFunctionCount()) { diff --git a/public/extensions/ISDKHooks.h b/public/extensions/ISDKHooks.h index b4f2dd75..66d6f2c7 100644 --- a/public/extensions/ISDKHooks.h +++ b/public/extensions/ISDKHooks.h @@ -36,7 +36,7 @@ #include #define SMINTERFACE_SDKHOOKS_NAME "ISDKHooks" -#define SMINTERFACE_SDKHOOKS_VERSION 2 +#define SMINTERFACE_SDKHOOKS_VERSION 1 class CBaseEntity; @@ -71,16 +71,6 @@ namespace SourceMod virtual void OnEntityDestroyed(CBaseEntity *pEntity) { } - - /** - * @brief When an entity is spawned - * - * @param pEntity CBaseEntity entity. - * @param classname Entity classname. - */ - virtual void OnEntitySpawned(CBaseEntity *pEntity, const char *classname) - { - } }; /**