Fix weird server crash
This commit is contained in:
+7
-1
@@ -131,6 +131,12 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways)
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_Hooked[entity] == nullptr)
|
||||||
|
{
|
||||||
|
smutils->LogError(myself, "Why Hooked Entity is nullptr <%d.%s>", entity, gamehelpers->GetEntityClassname(bcref));
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
if (g_Hooked[entity]->ShouldRemove())
|
if (g_Hooked[entity]->ShouldRemove())
|
||||||
{
|
{
|
||||||
auto flags = edict->m_fStateFlags;
|
auto flags = edict->m_fStateFlags;
|
||||||
@@ -168,7 +174,7 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways)
|
|||||||
bool TransmitManager::SDK_OnLoad(char* error, size_t maxlength, bool late)
|
bool TransmitManager::SDK_OnLoad(char* error, size_t maxlength, bool late)
|
||||||
{
|
{
|
||||||
sharesys->AddDependency(myself, "sdkhooks.ext", true, true);
|
sharesys->AddDependency(myself, "sdkhooks.ext", true, true);
|
||||||
SM_GET_IFACE(SDKHOOKS, g_pSDKHooks)
|
SM_GET_IFACE(SDKHOOKS, g_pSDKHooks);
|
||||||
|
|
||||||
if (!gameconfs->LoadGameConfigFile("sdkhooks.games", &g_pGameConf, error, maxlength))
|
if (!gameconfs->LoadGameConfigFile("sdkhooks.games", &g_pGameConf, error, maxlength))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user