Add autostrafe cvar

This commit is contained in:
8dcc 2023-07-23 15:38:43 +02:00
parent 2e1b44a825
commit 2141daae27
2 changed files with 6 additions and 3 deletions

View File

@ -4,10 +4,12 @@
#include "include/globals.h" #include "include/globals.h"
DECL_CVAR(bhop); DECL_CVAR(bhop);
DECL_CVAR(autostrafe);
DECL_CVAR(esp); DECL_CVAR(esp);
bool cvars_init(void) { bool cvars_init(void) {
cv_bhop = REGISTER_CVAR("bhop", "1"); cv_bhop = REGISTER_CVAR("bhop", "1");
cv_autostrafe = REGISTER_CVAR("autostrafe", "0");
cv_esp = REGISTER_CVAR("esp", "0"); cv_esp = REGISTER_CVAR("esp", "0");
return true; return true;

View File

@ -25,11 +25,12 @@
#define REGISTER_CVAR(name, value) \ #define REGISTER_CVAR(name, value) \
i_engine->pfnRegisterVariable(CVAR_PREFIX name, value, CVAR_HACK_ID); i_engine->pfnRegisterVariable(CVAR_PREFIX name, value, CVAR_HACK_ID);
#define CVAR_ON(name) (cv_##name->value != 0) #define CVAR_ON(name) (cv_##name->value != 0.0f)
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
DECL_CVAR_EXTERN(bhop); DECL_CVAR_EXTERN(bhop);
DECL_CVAR_EXTERN(autostrafe);
DECL_CVAR_EXTERN(esp); DECL_CVAR_EXTERN(esp);
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/