From 50327a252aeef180a0d6fa0c4437569af9b58110 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Sun, 29 Jun 2008 05:04:32 +0000 Subject: [PATCH] Single most annoying and hard to find bug ive ever come across. I'd like to thank MSVC for not firing the one breakpoint I actually needed. Oh and a possible fix to sdktools. --HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402294 --- extensions/sdktools/extension.cpp | 8 ++++---- extensions/tf2/criticals.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/sdktools/extension.cpp b/extensions/sdktools/extension.cpp index 263fe4d4..c2d580cc 100644 --- a/extensions/sdktools/extension.cpp +++ b/extensions/sdktools/extension.cpp @@ -82,6 +82,10 @@ extern sp_nativeinfo_t g_TeamNatives[]; bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late) { + if (!gameconfs->LoadGameConfigFile(SDKTOOLS_GAME_FILE, &g_pGameConf, error, maxlength)) + { + return false; + } sharesys->AddDependency(myself, "bintools.ext", true, true); sharesys->AddNatives(myself, g_CallNatives); sharesys->AddNatives(myself, g_Natives); @@ -96,10 +100,6 @@ bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late) SM_GET_IFACE(GAMEHELPERS, g_pGameHelpers); - if (!gameconfs->LoadGameConfigFile(SDKTOOLS_GAME_FILE, &g_pGameConf, error, maxlength)) - { - return false; - } playerhelpers->AddClientListener(&g_SdkTools); g_CallHandle = handlesys->CreateType("ValveCall", this, 0, NULL, NULL, myself->GetIdentity(), NULL); diff --git a/extensions/tf2/criticals.h b/extensions/tf2/criticals.h index 604647fc..7d520316 100644 --- a/extensions/tf2/criticals.h +++ b/extensions/tf2/criticals.h @@ -55,7 +55,10 @@ public: ~CriticalHitManager() { + if (forward != NULL) + { forwards->ReleaseForward(forward); + } DeleteCriticalDetour(); }