diff --git a/extensions/sdktools/hooks.cpp b/extensions/sdktools/hooks.cpp index 7fd35e52..79094702 100644 --- a/extensions/sdktools/hooks.cpp +++ b/extensions/sdktools/hooks.cpp @@ -65,9 +65,6 @@ SH_DECL_HOOK2_void(INetChannel, ProcessPacket, SH_NOATTRIB, 0, struct netpacket_ SourceHook::CallClass *basefilesystemPatch = NULL; CHookManager::CHookManager() -#if SOURCE_ENGINE == SE_TF2 - : replay_enabled("replay_enabled", false) -#endif { m_usercmdsPreFwd = NULL; m_usercmdsFwd = NULL; @@ -446,7 +443,8 @@ void CHookManager::NetChannelHook(int client) /* Initial Hook */ #if SOURCE_ENGINE == SE_TF2 - if (replay_enabled.GetBool()) + ConVarRef replay_enable("replay_enable", false); + if (replay_enable.GetBool()) { if (!m_bFSTranHookWarned) { diff --git a/extensions/sdktools/hooks.h b/extensions/sdktools/hooks.h index 0f535ef7..cdb97dd0 100644 --- a/extensions/sdktools/hooks.h +++ b/extensions/sdktools/hooks.h @@ -90,9 +90,6 @@ private: #endif INetChannel *m_pActiveNetChannel; bool m_bFSTranHookWarned = false; -#if SOURCE_ENGINE == SE_TF2 - ConVarRef replay_enabled; -#endif }; extern CHookManager g_Hooks;