Change cvar from 'cv_' to 'dz_'

This commit is contained in:
Wizzard 2023-09-19 10:45:57 -04:00
parent 02888c1158
commit f0485a3f36
8 changed files with 24 additions and 24 deletions

View File

@ -25,14 +25,14 @@ Also make sure to check out [[https://github.com/deboogerxyz/ahc][deboogerxyz/ah
| Feature | Command | Values (0..n) | | Feature | Command | Values (0..n) |
|------------+---------------+------------------------| |------------+---------------+------------------------|
| Bhop | =cv_bhop= | off/on | | Bhop | =dz_bhop= | off/on |
| Autostrafe | =cv_autostrafe= | off/rage/legit | | Autostrafe | =dz_autostrafe= | off/rage/legit |
| Aimbot | =cv_aimbot= | off/fov* | | Aimbot | =dz_aimbot= | off/fov* |
| Autoshoot | =cv_autoshoot= | off/on* | | Autoshoot | =dz_autoshoot= | off/on* |
| ESP | =cv_esp= | off/3d-box/name/all | | ESP | =dz_esp= | off/3d-box/name/all |
| Chams | =cv_chams= | off/players/hands/all* | | Chams | =dz_chams= | off/players/hands/all* |
| Crosshair | =cv_crosshair= | off/length | | Crosshair | =dz_crosshair= | off/length |
| Tracers | =cv_tracers= | off/on* | | Tracers | =dz_tracers= | off/on* |
#+begin_quote #+begin_quote
@ -40,7 +40,7 @@ Also make sure to check out [[https://github.com/deboogerxyz/ahc][deboogerxyz/ah
#+end_quote #+end_quote
#+begin_quote #+begin_quote
*Note:* If =cv_autoshoot= is enabled, and =cv_aimbot= is enabled, it will stop *Note:* If =dz_autoshoot= is enabled, and =dz_aimbot= is enabled, it will stop
attacking if there is no visible target. attacking if there is no visible target.
#+end_quote #+end_quote

View File

@ -42,7 +42,7 @@ static vec3_t get_closest_delta(vec3_t viewangles) {
/* These 2 vars are used to store the best target across iterations. /* These 2 vars are used to store the best target across iterations.
* NOTE: The default value of best_fov will be the aimbot fov */ * NOTE: The default value of best_fov will be the aimbot fov */
float best_fov = cv_aimbot->value; float best_fov = dz_aimbot->value;
vec3_t best_delta = { 0, 0, 0 }; vec3_t best_delta = { 0, 0, 0 };
for (int i = 1; i <= i_engine->GetMaxClients(); i++) { for (int i = 1; i <= i_engine->GetMaxClients(); i++) {

View File

@ -15,7 +15,7 @@ enum chams_settings {
visible_flags visible_mode; visible_flags visible_mode;
bool chams(void* this_ptr) { bool chams(void* this_ptr) {
const int setting = cv_chams->value == 5.0f ? 7 : cv_chams->value; const int setting = dz_chams->value == 5.0f ? 7 : dz_chams->value;
if (setting == DISABLED) if (setting == DISABLED)
return false; return false;

View File

@ -5,7 +5,7 @@
#include "../include/cvars.h" #include "../include/cvars.h"
#include "../include/util.h" #include "../include/util.h"
/* For cv_esp */ /* For dz_esp */
enum esp_values { enum esp_values {
ESP_OFF = 0, ESP_OFF = 0,
ESP_BOX = 1, ESP_BOX = 1,
@ -98,7 +98,7 @@ static bool gl_draw2dbox(vec3_t o, int bh) {
} }
void esp(void) { void esp(void) {
const int setting = (int)cv_esp->value; const int setting = (int)dz_esp->value;
if (setting == ESP_OFF) if (setting == ESP_OFF)
return; return;

View File

@ -14,7 +14,7 @@ void custom_crosshair(void) {
int my = game_info->m_height / 2; int my = game_info->m_height / 2;
/* The real length is sqrt(2 * (len^2)) */ /* The real length is sqrt(2 * (len^2)) */
const int len = cv_crosshair->value; const int len = dz_crosshair->value;
const int gap = 1; const int gap = 1;
const float w = 1; const float w = 1;
const rgb_t col = { 255, 255, 255 }; const rgb_t col = { 255, 255, 255 };

View File

@ -82,7 +82,7 @@ void bhop(usercmd_t* cmd) {
/* Autostrafe if enabled. Check if we are in the air and holding space. */ /* Autostrafe if enabled. Check if we are in the air and holding space. */
if (is_jumping) { if (is_jumping) {
switch ((int)cv_autostrafe->value) { switch ((int)dz_autostrafe->value) {
case 1: case 1:
autostrafe_rage(cmd); autostrafe_rage(cmd);
break; break;

View File

@ -74,7 +74,7 @@ void h_CL_CreateMove(float frametime, usercmd_t* cmd, int active) {
int h_HUD_Redraw(float time, int intermission) { int h_HUD_Redraw(float time, int intermission) {
int ret = ORIGINAL(HUD_Redraw, time, intermission); int ret = ORIGINAL(HUD_Redraw, time, intermission);
if (cv_watermark->value) { if (dz_watermark->value) {
/* Watermark */ /* Watermark */
engine_draw_text(5, 5, "https://git.deadzone.lol/Wizzard/goldsource-cheat", (rgb_t){ 0, 255, 255 }); engine_draw_text(5, 5, "https://git.deadzone.lol/Wizzard/goldsource-cheat", (rgb_t){ 0, 255, 255 });
} }
@ -164,8 +164,8 @@ void h_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
void h_CL_Move() { void h_CL_Move() {
if (cv_clmove->value != 0) { if (dz_clmove->value != 0) {
for (int i = 0; i < (int)cv_clmove->value; i++) for (int i = 0; i < (int)dz_clmove->value; i++)
CALL_ORIGINAL(detour_data_clmove, clmove_type); CALL_ORIGINAL(detour_data_clmove, clmove_type);
} }

View File

@ -5,7 +5,7 @@
#include "sdk.h" #include "sdk.h"
#include "globals.h" #include "globals.h"
#define CVAR_PREFIX "cv_" #define CVAR_PREFIX "dz_"
#define CVAR_HACK_ID 0x4000 /* (1<<14) One that is not in use by the game */ #define CVAR_HACK_ID 0x4000 /* (1<<14) One that is not in use by the game */
/* /*
@ -16,17 +16,17 @@
* *
* prefix | meaning * prefix | meaning
* -------+------------------------------- * -------+-------------------------------
* cv_* | cvar variable * dz_* | cvar variable
*/ */
#define DECL_CVAR(name) cvar_t* cv_##name = NULL; #define DECL_CVAR(name) cvar_t* dz_##name = NULL;
#define DECL_CVAR_EXTERN(name) extern cvar_t* cv_##name; #define DECL_CVAR_EXTERN(name) extern cvar_t* dz_##name;
#define REGISTER_CVAR(name, value) \ #define REGISTER_CVAR(name, value) \
cv_##name = \ dz_##name = \
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.0f) #define CVAR_ON(name) (dz_##name->value != 0.0f)
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/