From a86f386f121cb47f128c72ac71d3bda47cf0cf0f Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Fri, 23 Nov 2007 23:24:40 +0000 Subject: [PATCH] gah forgot this --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401724 --- core/GameConfigs.cpp | 2 +- extensions/sdktools/vglobals.cpp | 36 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/GameConfigs.cpp b/core/GameConfigs.cpp index 86b87f99..b5b5ca8f 100644 --- a/core/GameConfigs.cpp +++ b/core/GameConfigs.cpp @@ -426,7 +426,7 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states) } #endif /* First, preprocess the signature */ - char real_sig[255]; + char real_sig[511]; size_t real_bytes; size_t length; diff --git a/extensions/sdktools/vglobals.cpp b/extensions/sdktools/vglobals.cpp index fd872aac..d7cd3e4f 100644 --- a/extensions/sdktools/vglobals.cpp +++ b/extensions/sdktools/vglobals.cpp @@ -40,17 +40,6 @@ void InitializeValveGlobals() char *addr = NULL; int offset; - /* g_pGameRules */ - if (!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr) - { - return; - } - if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset) - { - return; - } - g_pGameRules = *reinterpret_cast(addr + offset); - /* gEntList and/or g_pEntityList */ if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr) || !addr) { @@ -61,24 +50,35 @@ void InitializeValveGlobals() return; } g_EntList = *reinterpret_cast(addr + offset); + + /* g_pGameRules */ + if (!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr) + { + return; + } + if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset) + { + return; + } + g_pGameRules = *reinterpret_cast(addr + offset); } #elif defined PLATFORM_LINUX void InitializeValveGlobals() { char *addr = NULL; - /* g_pGameRules */ - if (!g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) || !addr) - { - return; - } - g_pGameRules = reinterpret_cast(addr); - /* gEntList and/or g_pEntityList */ if (!g_pGameConf->GetMemSig("gEntList", (void **)&addr) || !addr) { return; } g_EntList = reinterpret_cast(addr); + + /* g_pGameRules */ + if (!g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) || !addr) + { + return; + } + g_pGameRules = reinterpret_cast(addr); } #endif