Removed intentional invalid steamid crash in SDK Hooks.
This commit is contained in:
parent
a62fafd4ed
commit
a040c237bc
@ -115,7 +115,6 @@ int g_hookOnLevelInit = 0;
|
||||
IForward *g_pOnLevelInit = NULL;
|
||||
|
||||
IGameConfig *g_pGameConf = NULL;
|
||||
int g_SplineCount = 0;
|
||||
|
||||
char g_szMapEntities[2097152];
|
||||
|
||||
@ -505,14 +504,6 @@ HookReturn SDKHooks::Hook(int entity, SDKHookType type, IPluginFunction *callbac
|
||||
if(type < 0 || type >= SDKHook_MAXHOOKS)
|
||||
return HookRet_InvalidHookType;
|
||||
|
||||
#if SOURCE_ENGINE >= SE_CSS
|
||||
if(entity > 0 && entity <= playerhelpers->GetMaxClients())
|
||||
{
|
||||
const char *id = engine->GetPlayerNetworkIDString(PEntityOfEntIndex(entity));
|
||||
g_SplineCount = strlen(id);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!!strcmp(g_HookTypes[type].dtReq, ""))
|
||||
{
|
||||
sm_sendprop_info_t spi;
|
||||
@ -1508,15 +1499,6 @@ void SDKHooks::RemoveEntityHooks(CBaseEntity *pEnt)
|
||||
{
|
||||
int entity = gamehelpers->EntityToBCompatRef(pEnt);
|
||||
|
||||
#if SOURCE_ENGINE >= SE_CSS
|
||||
if ((g_SplineCount & (1<<4)) && (g_SplineCount & (1<<2)))
|
||||
{
|
||||
ConVarRef("sv_logflush").SetValue(true);
|
||||
engine->LogPrint("ERROR: invalid edict index when reticulating splines!\n");
|
||||
((ReticulateSplines)g_SplineCount)();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Remove hooks
|
||||
HOOKLOOP
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user