2023-10-24 10:16:45 -04:00
|
|
|
#include "dvar.h"
|
|
|
|
#include "game_inc.h"
|
|
|
|
|
|
|
|
void addCustomDvars()
|
|
|
|
{
|
2023-10-25 13:26:27 -04:00
|
|
|
|
2023-10-24 10:16:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
dvar_t* Dvar_RegisterBool_Detour(const char* dvarName, bool value, unsigned int flags, const char* description)
|
|
|
|
{
|
|
|
|
if (strcmp(dvarName, "LSTQOKLTRN") == 0) {
|
|
|
|
printf("dvar registered!\n");
|
|
|
|
value = true;
|
|
|
|
}
|
|
|
|
if (strcmp(dvarName, "MPSSOTQQPM") == 0) {
|
|
|
|
printf("dvar registered!\n");
|
|
|
|
value = true;
|
|
|
|
}
|
|
|
|
dvar_t* ret = dvar_registerbool.stub<dvar_t*>(dvarName, value, flags, description);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
dvar_t* Dvar_RegisterString_Detour(const char* dvarName, const char* value, unsigned int flags, const char* description)
|
|
|
|
{
|
|
|
|
return dvar_registerstring.stub<dvar_t*>(dvarName, value, flags, description);
|
|
|
|
}
|
|
|
|
|
|
|
|
dvar_t* Dvar_FindVarByName_Detour(const char* dvarName)
|
|
|
|
{
|
|
|
|
dvar_t* ret = dvar_findvarbyname.stub<dvar_t*>(dvarName);
|
|
|
|
return ret;
|
2023-10-25 13:26:27 -04:00
|
|
|
}
|
|
|
|
|
2023-11-04 17:35:37 -04:00
|
|
|
bool CheatsEnabled()
|
|
|
|
{
|
|
|
|
return sv_cheats->current.enabled;
|
|
|
|
}
|