Skip to content

Commit

Permalink
Renamed functions to correct name
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex109 committed Mar 29, 2024
1 parent 27a649f commit 8c29247
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions cod4qol/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ void commands::InitializeCommands()

sv_running = game::Find("sv_running");

qol_check_updates = game::Dvar_RegisterBool("qol_check_updates", 1, game::dvar_flags::saved, "Enable cod4qol to check for updates at every startup.");
qol_check_updates = game::Cvar_RegisterBool("qol_check_updates", 1, game::dvar_flags::saved, "Enable cod4qol to check for updates at every startup.");

static const char* qol_getss_names[] = { "Off", "Notify", "Notify + Block", NULL };
qol_getss = game::Dvar_RegisterEnum("qol_getss", qol_getss_names, 0, game::dvar_flags::saved, "Notify and block getss from servers.");
qol_getss = game::Cvar_RegisterEnum("qol_getss", qol_getss_names, 0, game::dvar_flags::saved, "Notify and block getss from servers.");

qol_vstr_block = game::Dvar_RegisterBool("qol_vstr_block", 0, game::dvar_flags::saved, "Block every forced client commands from mods.");
qol_vstr_block = game::Cvar_RegisterBool("qol_vstr_block", 0, game::dvar_flags::saved, "Block every forced client commands from mods.");

qol_show_console = game::Dvar_RegisterBool("qol_show_console", 0, game::dvar_flags::saved, "Show the game's console on a separated window. In order to update it you need to execute \"toggleconsoleupdate\".");
qol_show_console = game::Cvar_RegisterBool("qol_show_console", 0, game::dvar_flags::saved, "Show the game's console on a separated window. In order to update it you need to execute \"toggleconsoleupdate\".");

qol_show_loading = game::Dvar_RegisterBool("qol_show_loading", 1, game::dvar_flags::saved, "Show mod and map info during loading. In order to update it you need to execute \"toggleloadinginfoupdate\".");
qol_show_loading = game::Cvar_RegisterBool("qol_show_loading", 1, game::dvar_flags::saved, "Show mod and map info during loading. In order to update it you need to execute \"toggleloadinginfoupdate\".");

qol_mirrorgun = game::Dvar_RegisterBool("qol_mirrorgun", 0, game::dvar_flags::saved, "Flip the gun on the left side of the screen.");
qol_mirrorgun = game::Cvar_RegisterBool("qol_mirrorgun", 0, game::dvar_flags::saved, "Flip the gun on the left side of the screen.");

qol_disable_steam_auth = game::Dvar_RegisterBool("qol_disable_steam_auth", 0, game::dvar_flags::saved, "Disable the authentication with steam if it is running on the computer. In order to update it you need to execute \"togglesteamauthupdate\".");
qol_disable_steam_auth = game::Cvar_RegisterBool("qol_disable_steam_auth", 0, game::dvar_flags::saved, "Disable the authentication with steam if it is running on the computer. In order to update it you need to execute \"togglesteamauthupdate\".");

qol_ambient = game::Dvar_RegisterBool("qol_ambient", 1, game::dvar_flags::saved, "Enable ambient sound/music cues.");
qol_ambient = game::Cvar_RegisterBool("qol_ambient", 1, game::dvar_flags::saved, "Enable ambient sound/music cues.");

qol_stockmenu = game::Dvar_RegisterBool("qol_stockmenu", 0, game::dvar_flags::saved, "Load the stock menu even with a mod loaded.");
qol_stockmenu = game::Cvar_RegisterBool("qol_stockmenu", 0, game::dvar_flags::saved, "Load the stock menu even with a mod loaded.");

std::cout << "Commands initialized!" << std::endl;
}
Expand Down
12 changes: 6 additions & 6 deletions cod4qol/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,11 @@ namespace game
typedef void(*Sys_CreateConsole_t)(int);
extern Sys_CreateConsole_t Sys_CreateConsole;

typedef game::dvar_s*(*Dvar_RegisterBool_t)(const char* name, int boolean, game::dvar_flags flags, const char* description);
extern Dvar_RegisterBool_t Dvar_RegisterBool;
typedef game::dvar_s*(*Cvar_RegisterBool_t)(const char* name, int boolean, game::dvar_flags flags, const char* description);
extern Cvar_RegisterBool_t Cvar_RegisterBool;

typedef game::dvar_s*(*Dvar_RegisterEnum_t)(const char* name, const char** strings, int integer, game::dvar_flags flags, const char* description);
extern Dvar_RegisterEnum_t Dvar_RegisterEnum;
typedef game::dvar_s*(*Cvar_RegisterEnum_t)(const char* name, const char** strings, int integer, game::dvar_flags flags, const char* description);
extern Cvar_RegisterEnum_t Cvar_RegisterEnum;

inline void* Cmd_AddCommand_fnc = (void*)(cod4x_entry + 0x2116C);
inline game::CmdArgs* cmd_args = reinterpret_cast<game::CmdArgs*>(0x1410B40);
Expand All @@ -541,8 +541,8 @@ namespace game
inline game::DB_LoadXAssets_t DB_LoadXAssets = DB_LoadXAssets_t(0x48A2B0);
inline game::Sys_CreateConsole_t Sys_CreateConsole = Sys_CreateConsole_t(cod4x_entry + 0x7F503);

inline game::Dvar_RegisterBool_t Dvar_RegisterBool = Dvar_RegisterBool_t(cod4x_entry + 0x2D8F2);
inline game::Dvar_RegisterEnum_t Dvar_RegisterEnum = Dvar_RegisterEnum_t(cod4x_entry + 0x2DCAF);
inline game::Cvar_RegisterBool_t Cvar_RegisterBool = Cvar_RegisterBool_t(cod4x_entry + 0x2D8F2);
inline game::Cvar_RegisterEnum_t Cvar_RegisterEnum = Cvar_RegisterEnum_t(cod4x_entry + 0x2DCAF);

inline game::dvar_s* fs_game = game::Find("fs_game");
inline game::dvar_s* fs_homepath = game::Find("fs_homepath");
Expand Down

0 comments on commit 8c29247

Please sign in to comment.