From eb2605f1a393a07dbd4cb385ab39170748f735bf Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 14 Jul 2010 20:29:45 -0500 Subject: [PATCH] Fixed replicate and notify params on SetConVar* and ResetConVar which didn't work on old engine games (bug 4516, r=pred, a13=dvander). This also fixes an issue where clients could be notified of convar changes twice on newer engines (Orange Box and later). --- core/smn_console.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/smn_console.cpp b/core/smn_console.cpp index b2020e15..e89a1f9f 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -187,7 +187,7 @@ private: KTrie m_CmdFlags; } s_CommandFlagsHelper; -#if SOURCE_ENGINE >= SE_ORANGEBOX +#if SOURCE_ENGINE < SE_ORANGEBOX static void ReplicateConVar(ConVar *pConVar) { int maxClients = g_Players.GetMaxClients(); @@ -361,7 +361,7 @@ static cell_t sm_SetConVarNum(IPluginContext *pContext, const cell_t *params) pConVar->SetValue(params[2]); -#if SOURCE_ENGINE >= SE_ORANGEBOX +#if SOURCE_ENGINE < SE_ORANGEBOX /* Should we replicate it? */ if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED)) { @@ -410,7 +410,7 @@ static cell_t sm_SetConVarFloat(IPluginContext *pContext, const cell_t *params) float value = sp_ctof(params[2]); pConVar->SetValue(value); -#if SOURCE_ENGINE >= SE_ORANGEBOX +#if SOURCE_ENGINE < SE_ORANGEBOX /* Should we replicate it? */ if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED)) { @@ -461,7 +461,7 @@ static cell_t sm_SetConVarString(IPluginContext *pContext, const cell_t *params) pConVar->SetValue(value); -#if SOURCE_ENGINE >= SE_ORANGEBOX +#if SOURCE_ENGINE < SE_ORANGEBOX /* Should we replicate it? */ if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED)) { @@ -492,7 +492,7 @@ static cell_t sm_ResetConVar(IPluginContext *pContext, const cell_t *params) pConVar->Revert(); -#if SOURCE_ENGINE >= SE_ORANGEBOX +#if SOURCE_ENGINE < SE_ORANGEBOX /* Should we replicate it? */ if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED)) {