From dde43b6e0d671a9d5d830533d02b46ad0e2a8765 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 21 Sep 2004 15:49:36 +0000 Subject: [PATCH] Fixed CVARs not registering properly (hullu) --- amxmodx/amxmodx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 8d60ffa2..61d6cadf 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -1749,7 +1749,11 @@ static cell AMX_NATIVE_CALL register_cvar(AMX *amx, cell *params) /* 3 param */ g_cvars.put( cvar ); if ( CVAR_GET_POINTER(temp) == 0 ) - CVAR_REGISTER( cvar->getCvar() ); + { + static cvar_t cvar_reg_helper; + cvar_reg_helper = *(cvar->getCvar()); + CVAR_REGISTER( &cvar_reg_helper ); + } CVAR_SET_STRING( temp ,get_amxstring(amx,params[2],1,i)); return 1;