Don't cache replay_enable value when evaling whether to use FileExists hook.
Speculative fix for #1581
This commit is contained in:
parent
636161e183
commit
f9309c83d2
@ -65,6 +65,9 @@ SH_DECL_HOOK2_void(INetChannel, ProcessPacket, SH_NOATTRIB, 0, struct netpacket_
|
||||
SourceHook::CallClass<IBaseFileSystem> *basefilesystemPatch = NULL;
|
||||
|
||||
CHookManager::CHookManager()
|
||||
#if SOURCE_ENGINE == SE_TF2
|
||||
: replay_enabled("replay_enabled", false)
|
||||
#endif
|
||||
{
|
||||
m_usercmdsFwd = NULL;
|
||||
m_usercmdsPostFwd = NULL;
|
||||
@ -188,10 +191,6 @@ void CHookManager::Shutdown()
|
||||
void CHookManager::OnMapStart()
|
||||
{
|
||||
m_bFSTranHookWarned = false;
|
||||
#if SOURCE_ENGINE == SE_TF2
|
||||
static ConVarRef replay_enable("replay_enable");
|
||||
m_bReplayEnabled = replay_enable.GetBool();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CHookManager::OnClientConnect(int client)
|
||||
@ -410,7 +409,7 @@ void CHookManager::NetChannelHook(int client)
|
||||
|
||||
/* Initial Hook */
|
||||
#if SOURCE_ENGINE == SE_TF2
|
||||
if (m_bReplayEnabled)
|
||||
if (replay_enabled.GetBool())
|
||||
{
|
||||
if (!m_bFSTranHookWarned)
|
||||
{
|
||||
|
@ -89,7 +89,9 @@ private:
|
||||
#endif
|
||||
INetChannel *m_pActiveNetChannel;
|
||||
bool m_bFSTranHookWarned = false;
|
||||
bool m_bReplayEnabled = false;
|
||||
#if SOURCE_ENGINE == SE_TF2
|
||||
ConVarRef replay_enabled;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern CHookManager g_Hooks;
|
||||
|
Loading…
Reference in New Issue
Block a user