Add cv_clmove cvar

This commit is contained in:
8dcc 2023-07-25 22:10:26 +02:00
parent 82580503ce
commit 56217cc7f3
3 changed files with 14 additions and 1 deletions

View File

@ -8,11 +8,15 @@ DECL_CVAR(autostrafe);
DECL_CVAR(esp);
DECL_CVAR(chams);
DECL_CVAR(clmove);
bool cvars_init(void) {
cv_bhop = REGISTER_CVAR("bhop", "1");
cv_autostrafe = REGISTER_CVAR("autostrafe", "0");
cv_esp = REGISTER_CVAR("esp", "3");
cv_chams = REGISTER_CVAR("chams", "1");
cv_clmove = REGISTER_CVAR("clmove", "0");
return true;
}

View File

@ -5,6 +5,9 @@
#include "include/util.h"
#include "include/detour.h" /* 8dcc/detour-lib */
/* DELME */
#include "include/cvars.h"
/* bhop(), esp(), etc. */
#include "features/features.h"
@ -117,6 +120,10 @@ void h_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
/*----------------------------------------------------------------------------*/
void h_CL_Move() {
/* printf("Hello from CL_Move!\n"); */
if (cv_clmove->value != 0) {
for (int i = 0; i < (int)cv_clmove->value; i++)
CALL_ORIGINAL(clmove_data, clmove);
}
CALL_ORIGINAL(clmove_data, clmove);
}

View File

@ -34,6 +34,8 @@ DECL_CVAR_EXTERN(autostrafe);
DECL_CVAR_EXTERN(esp);
DECL_CVAR_EXTERN(chams);
DECL_CVAR_EXTERN(clmove);
/*----------------------------------------------------------------------------*/
bool cvars_init(void);