Files
goldsrc-cheat/src/include/cvars.h

57 lines
1.6 KiB
C
Raw Normal View History

#ifndef CVARS_H_
#define CVARS_H_
#include "sdk.h"
#include "globals.h"
2023-09-19 10:45:57 -04:00
#define CVAR_PREFIX "dz_"
2023-07-21 13:49:12 +02:00
#define CVAR_HACK_ID 0x4000 /* (1<<14) One that is not in use by the game */
/*
* DECL_CVAR: Declares cvar variable in source file.
* DECL_CVAR_EXTERN: Same but for headers.
* REGISTER_CVAR: Create the cvar, return cvar_t*
* CVAR_ON: Returns true if the cvar is non-zero
*
* prefix | meaning
* -------+-------------------------------
2023-09-19 10:45:57 -04:00
* dz_* | cvar variable
*/
2023-09-19 10:45:57 -04:00
#define DECL_CVAR(name) cvar_t* dz_##name = NULL;
2023-09-19 10:45:57 -04:00
#define DECL_CVAR_EXTERN(name) extern cvar_t* dz_##name;
#define REGISTER_CVAR(name, value) \
2023-09-19 10:45:57 -04:00
dz_##name = \
i_engine->pfnRegisterVariable(CVAR_PREFIX #name, #value, CVAR_HACK_ID);
2023-09-19 10:45:57 -04:00
#define CVAR_ON(name) (dz_##name->value != 0.0f)
/*----------------------------------------------------------------------------*/
DECL_CVAR_EXTERN(movement_bhop);
DECL_CVAR_EXTERN(movement_autostrafe);
DECL_CVAR_EXTERN(aim_aimbot);
DECL_CVAR_EXTERN(aim_autoshoot);
DECL_CVAR_EXTERN(visuals_esp);
DECL_CVAR_EXTERN(visuals_chams);
DECL_CVAR_EXTERN(visuals_crosshair);
DECL_CVAR_EXTERN(visuals_tracers);
DECL_CVAR_EXTERN(movement_clmove);
2023-09-19 10:38:01 -04:00
DECL_CVAR_EXTERN(watermark);
DECL_CVAR_EXTERN(watermark_rainbow);
DECL_CVAR_EXTERN(aim_aimbot_silent);
DECL_CVAR_EXTERN(visuals_friendly);
DECL_CVAR_EXTERN(movement_antiaim);
DECL_CVAR_EXTERN(movement_antiaim_view);
DECL_CVAR_EXTERN(movement_fakeduck);
DECL_CVAR_EXTERN(misc_namechanger)
2023-07-25 22:10:26 +02:00
/*----------------------------------------------------------------------------*/
bool cvars_init(void);
#endif /* CVARS_H_ */