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

48 lines
1.2 KiB
C
Raw Normal View History

#ifndef CVARS_H_
#define CVARS_H_
#include "sdk.h"
#include "globals.h"
#define CVAR_PREFIX "cv_"
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
* -------+-------------------------------
* cv_* | cvar variable
*/
#define DECL_CVAR(name) cvar_t* cv_##name = NULL;
#define DECL_CVAR_EXTERN(name) extern cvar_t* cv_##name;
#define REGISTER_CVAR(name, value) \
cv_##name = \
i_engine->pfnRegisterVariable(CVAR_PREFIX #name, #value, CVAR_HACK_ID);
2023-07-23 15:38:43 +02:00
#define CVAR_ON(name) (cv_##name->value != 0.0f)
/*----------------------------------------------------------------------------*/
DECL_CVAR_EXTERN(bhop);
2023-07-23 15:38:43 +02:00
DECL_CVAR_EXTERN(autostrafe);
2023-07-29 16:24:59 +02:00
DECL_CVAR_EXTERN(aimbot);
DECL_CVAR_EXTERN(autoshoot);
2023-07-21 15:49:01 +02:00
DECL_CVAR_EXTERN(esp);
2023-07-24 17:03:06 +02:00
DECL_CVAR_EXTERN(chams);
2023-07-26 22:02:01 +02:00
DECL_CVAR_EXTERN(crosshair);
2023-07-31 15:54:47 +02:00
DECL_CVAR_EXTERN(tracers);
2023-07-25 22:10:26 +02:00
DECL_CVAR_EXTERN(clmove);
/*----------------------------------------------------------------------------*/
bool cvars_init(void);
#endif /* CVARS_H_ */