diff --git a/r5dev/common/global.cpp b/r5dev/common/global.cpp index 50210f24..d9b53957 100644 --- a/r5dev/common/global.cpp +++ b/r5dev/common/global.cpp @@ -51,6 +51,8 @@ ConVar* mp_gamemode = nullptr; ConVar* rcon_address = nullptr; ConVar* rcon_password = nullptr; +ConVar* enable_CmdKeyValues = nullptr; + ConVar* r_debug_overlay_nodecay = nullptr; ConVar* r_debug_overlay_invisible = nullptr; ConVar* r_debug_overlay_wireframe = nullptr; @@ -288,6 +290,8 @@ void ConVar_StaticInit(void) rcon_address = ConVar::StaticCreate("rcon_address", "[loopback]:37015", FCVAR_SERVER_CANNOT_QUERY | FCVAR_DONTRECORD | FCVAR_RELEASE, "Remote server access address.", false, 0.f, false, 0.f, nullptr, nullptr); rcon_password = ConVar::StaticCreate("rcon_password", "" , FCVAR_SERVER_CANNOT_QUERY | FCVAR_DONTRECORD | FCVAR_RELEASE, "Remote server access password (rcon is disabled if empty).", false, 0.f, false, 0.f, &RCON_PasswordChanged_f, nullptr); + enable_CmdKeyValues = ConVar::StaticCreate("enable_CmdKeyValues", "0", FCVAR_DEVELOPMENTONLY, "Toggle CmdKeyValues transmit and receive.", false, 0.f, false, 0.f, nullptr, nullptr); + r_debug_overlay_nodecay = ConVar::StaticCreate("r_debug_overlay_nodecay" , "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Keeps all debug overlays alive regardless of their lifetime. Use command 'clear_debug_overlays' to clear everything.", false, 0.f, false, 0.f, nullptr, nullptr); r_debug_overlay_invisible = ConVar::StaticCreate("r_debug_overlay_invisible" , "1", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Show invisible debug overlays (alpha < 1 = 255).", false, 0.f, false, 0.f, nullptr, nullptr); r_debug_overlay_wireframe = ConVar::StaticCreate("r_debug_overlay_wireframe" , "1", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Use wireframe in debug overlay.", false, 0.f, false, 0.f, nullptr, nullptr); diff --git a/r5dev/common/global.h b/r5dev/common/global.h index 6ea4fe5b..0a0d6cfd 100644 --- a/r5dev/common/global.h +++ b/r5dev/common/global.h @@ -42,6 +42,8 @@ extern ConVar* mp_gamemode; extern ConVar* rcon_address; extern ConVar* rcon_password; +extern ConVar* enable_CmdKeyValues; + extern ConVar* r_debug_overlay_nodecay; extern ConVar* r_debug_overlay_invisible; extern ConVar* r_debug_overlay_wireframe; @@ -145,6 +147,8 @@ extern ConVar* cl_quota_stringCmdsPerSecond; extern ConVar* cl_move_use_dt; +extern ConVar* enable_CmdKeyValues; + extern ConVar* cl_notify_invert_x; extern ConVar* cl_notify_invert_y; extern ConVar* cl_notify_offset_x; diff --git a/r5dev/common/netmessages.cpp b/r5dev/common/netmessages.cpp index d4de5599..b1576e8b 100644 --- a/r5dev/common/netmessages.cpp +++ b/r5dev/common/netmessages.cpp @@ -99,7 +99,7 @@ bool CLC_SetPlaylistVarOverride::WriteToBufferImpl(CLC_SetPlaylistVarOverride* t bool Base_CmdKeyValues::ReadFromBufferImpl(Base_CmdKeyValues* thisptr, bf_read* buffer) { // Abusable netmsg; only allow if cheats are enabled. - if (!sv_cheats->GetBool()) + if (!enable_CmdKeyValues->GetBool()) { return false; } @@ -109,7 +109,7 @@ bool Base_CmdKeyValues::ReadFromBufferImpl(Base_CmdKeyValues* thisptr, bf_read* bool Base_CmdKeyValues::WriteToBufferImpl(Base_CmdKeyValues* thisptr, bf_write* buffer) { // Abusable netmsg; only allow if cheats are enabled. - if (!sv_cheats->GetBool()) + if (!enable_CmdKeyValues->GetBool()) { return false; }