diff --git a/src/cvars.c b/src/cvars.c index 104a768..cfdac20 100644 --- a/src/cvars.c +++ b/src/cvars.c @@ -12,13 +12,13 @@ DECL_CVAR(crosshair); DECL_CVAR(clmove); bool cvars_init(void) { - cv_bhop = REGISTER_CVAR("bhop", "1"); - cv_autostrafe = REGISTER_CVAR("autostrafe", "0"); - cv_aimbot = REGISTER_CVAR("aimbot", "1"); - cv_esp = REGISTER_CVAR("esp", "3"); - cv_chams = REGISTER_CVAR("chams", "1"); - cv_crosshair = REGISTER_CVAR("crosshair", "0"); - cv_clmove = REGISTER_CVAR("clmove", "0"); + REGISTER_CVAR(bhop, 1); + REGISTER_CVAR(autostrafe, 0); + REGISTER_CVAR(aimbot, 1); + REGISTER_CVAR(esp, 3); + REGISTER_CVAR(chams, 1); + REGISTER_CVAR(crosshair, 0); + REGISTER_CVAR(clmove, 0); return true; } diff --git a/src/include/cvars.h b/src/include/cvars.h index 299b5a1..3b6a225 100644 --- a/src/include/cvars.h +++ b/src/include/cvars.h @@ -23,7 +23,8 @@ #define DECL_CVAR_EXTERN(name) extern cvar_t* cv_##name; #define REGISTER_CVAR(name, value) \ - i_engine->pfnRegisterVariable(CVAR_PREFIX name, value, CVAR_HACK_ID); + cv_##name = \ + i_engine->pfnRegisterVariable(CVAR_PREFIX #name, #value, CVAR_HACK_ID); #define CVAR_ON(name) (cv_##name->value != 0.0f)