From 27ddc30d68e879b6cd3950c6707a5ad9a59b2a7d Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:18:50 +0200 Subject: [PATCH] Prune ununsed/useless cvars Also removed these from the CFG files. * 'sq_showvmoutput' has been renamed to 'script_show_output'. * 'sq_showvmwarning' has been renamed to 'script_show_warning'. --- r5dev/resource/cfg/autoexec.cfg | 8 -------- r5dev/resource/cfg/autoexec_client.cfg | 10 ---------- r5dev/resource/cfg/autoexec_client_dev.cfg | 1 - r5dev/resource/cfg/autoexec_dev.cfg | 16 ++-------------- r5dev/squirrel/sqscript.cpp | 14 +++----------- r5dev/squirrel/sqvm.cpp | 4 ++-- r5dev/tier1/IConVar.cpp | 9 +++------ r5dev/tier1/cvar.cpp | 7 ++----- r5dev/tier1/cvar.h | 7 ++----- 9 files changed, 14 insertions(+), 62 deletions(-) diff --git a/r5dev/resource/cfg/autoexec.cfg b/r5dev/resource/cfg/autoexec.cfg index 22a8f194..0bae6587 100644 --- a/r5dev/resource/cfg/autoexec.cfg +++ b/r5dev/resource/cfg/autoexec.cfg @@ -2,11 +2,3 @@ //// REPLICATED //// ////////////////////////// mp_allowed "1" // Whether multiplayer is allowed or not. - -////////////////////////// -//// SQUIRREL //// -////////////////////////// -sq_showrsonloading "1" // Shows the global include files the SQVM is loading for loading scripts. -sq_showscriptloading "0" // Shows the script files the SQVM is loading for precompile job. -sq_showvmoutput "1" // Shows the VM output. 1 = Log to file. 2 = 1 + log to console. 3 = 1 + 2 + log to overhead console. 4 = only log to overhead console. -sq_showvmwarning "1" // Shows the VM warning output. 1 = Log to file. 2 = 1 + log to console. diff --git a/r5dev/resource/cfg/autoexec_client.cfg b/r5dev/resource/cfg/autoexec_client.cfg index d9533c49..bb4235b3 100644 --- a/r5dev/resource/cfg/autoexec_client.cfg +++ b/r5dev/resource/cfg/autoexec_client.cfg @@ -9,19 +9,9 @@ cl_noTimeoutLocalHost "0" // Do not time-out on local conne ////////////////////////// //// DEBUG TEXT //// ////////////////////////// -cl_showfps "0" // Shows detailed client/server stats. -cl_showpos "0" // Shows detailed position stats. -cl_showsimstats "0" // Shows detailed simulation stats. -cl_showgpustats "0" // Shows detailed GPU memory stats. -phys_showObjectCount "0" // Shows physics object count. rui_defaultDebugFontFace "ArameMono" // Sets the RUI debug font face. ////////////////////////// //// PLATFORM //// ////////////////////////// origin_disconnectWhenOffline "0" // Whether the client disconnect itself from the server if Origin is offline. - -////////////////////////// -//// MATSYS //// -////////////////////////// -mat_showdxoutput "0" // Shows debug information from the DirectX hook system. diff --git a/r5dev/resource/cfg/autoexec_client_dev.cfg b/r5dev/resource/cfg/autoexec_client_dev.cfg index c45a90af..75d70278 100644 --- a/r5dev/resource/cfg/autoexec_client_dev.cfg +++ b/r5dev/resource/cfg/autoexec_client_dev.cfg @@ -70,7 +70,6 @@ cl_ent_absbox "1" // Display entity abs bo ////////////////////////// //// MATSYS //// ////////////////////////// -mat_showdxoutput "1" // Shows debug information from the DirectX hook system. gl_clear_color_buffer "1" // Enable or disable the clearing of the main color buffer. //mat_sync_rt "1" // Enable to debug render threads more easily ( !slower! ). //mat_sync_rt_flushes_gpu "1" // Enable to debug render threads more easily ( !slower! ). diff --git a/r5dev/resource/cfg/autoexec_dev.cfg b/r5dev/resource/cfg/autoexec_dev.cfg index 4e2e1d83..3939576c 100644 --- a/r5dev/resource/cfg/autoexec_dev.cfg +++ b/r5dev/resource/cfg/autoexec_dev.cfg @@ -13,20 +13,8 @@ net_useRandomKey "0" // Use a randomized netkey on launch. net_processTimeBudget "0" // Net message process budget in milliseconds (removing netchannel if exceeded). net_usesocketsforloopback "1" // Whether to use network sockets layer for packets. -////////////////////////// -//// FILESYSTEM //// -////////////////////////// -fs_warning_level_native "0" // Sets SDK file system warning level. - -////////////////////////// -//// MATSYS //// -////////////////////////// -mat_showdxoutput "1" // Shows debug information from the DirectX hook system. - ////////////////////////// //// SQUIRREL //// ////////////////////////// -sq_showrsonloading "1" // Shows the global include files the SQVM is loading for loading scripts. -sq_showscriptloading "0" // Shows the script files the SQVM is loading for precompile job. -sq_showvmoutput "3" // Shows the VM output. 1 = Log to file. 2 = 1 + log to console. 3 = 1 + 2 + log to overhead console. 4 = only log to overhead console. -sq_showvmwarning "2" // Shows the VM warning output. 1 = Log to file. 2 = 1 + log to console. +script_show_output "2" // Shows the VM output. +script_show_warning "2" // Shows the VM warning output. diff --git a/r5dev/squirrel/sqscript.cpp b/r5dev/squirrel/sqscript.cpp index 9321f702..e453aa68 100644 --- a/r5dev/squirrel/sqscript.cpp +++ b/r5dev/squirrel/sqscript.cpp @@ -260,10 +260,7 @@ SQBool Script_DestroySignalEntryListHead(CSquirrelVM* s, HSQUIRRELVM v, SQFloat //--------------------------------------------------------------------------------- SQInteger Script_LoadRson(const SQChar* rsonfile) { - if (sq_showrsonloading->GetBool()) - { - DevMsg(eDLL_T::ENGINE, "Loading RSON: '%s'\n", rsonfile); - } + DevMsg(eDLL_T::ENGINE, "Loading RSON: '%s'\n", rsonfile); return v_Script_LoadRson(rsonfile); } @@ -276,11 +273,6 @@ SQInteger Script_LoadRson(const SQChar* rsonfile) //--------------------------------------------------------------------------------- SQBool Script_LoadScript(HSQUIRRELVM v, const SQChar* path, const SQChar* name, SQInteger flags) { - if (sq_showscriptloading->GetBool()) - { - DevMsg(eDLL_T::ENGINE, "Loading script: '%s'\n", name); - } - /////////////////////////////////////////////////////////////////////////////// return v_Script_LoadScript(v, path, name, flags); } @@ -344,7 +336,7 @@ void VSquirrelVM::Attach() const #endif // !DEDICATED DetourAttach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead); DetourAttach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson); - DetourAttach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); + //DetourAttach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); } //--------------------------------------------------------------------------------- void VSquirrelVM::Detach() const @@ -363,5 +355,5 @@ void VSquirrelVM::Detach() const #endif // !DEDICATED DetourDetach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead); DetourDetach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson); - DetourDetach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); + //DetourDetach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); } diff --git a/r5dev/squirrel/sqvm.cpp b/r5dev/squirrel/sqvm.cpp index a13c4289..48f777d0 100644 --- a/r5dev/squirrel/sqvm.cpp +++ b/r5dev/squirrel/sqvm.cpp @@ -75,7 +75,7 @@ SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...) va_list args; va_start(args, fmt); - CoreMsgV(type, static_cast(sq_showvmoutput->GetInt()), remoteContext, "squirrel_re", fmt, args); + CoreMsgV(type, static_cast(script_show_output->GetInt()), remoteContext, "squirrel_re", fmt, args); va_end(args); return SQ_OK; @@ -122,7 +122,7 @@ SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger* } std::string svConstructor(*ppString, *nStringSize); // Get string from memory via std::string constructor. - CoreMsg(LogType_t::SQ_WARNING, static_cast(sq_showvmwarning->GetInt()), + CoreMsg(LogType_t::SQ_WARNING, static_cast(script_show_warning->GetInt()), remoteContext, NO_ERROR, "squirrel_re(warning)", "%s", svConstructor.c_str()); return result; diff --git a/r5dev/tier1/IConVar.cpp b/r5dev/tier1/IConVar.cpp index a43818ac..5112a229 100644 --- a/r5dev/tier1/IConVar.cpp +++ b/r5dev/tier1/IConVar.cpp @@ -200,7 +200,7 @@ void ConVar::Init(void) #endif // !DEDICATED //------------------------------------------------------------------------- // FILESYSTEM | - fs_showWarnings = ConVar::Create("fs_showWarnings" , "0", FCVAR_DEVELOPMENTONLY, "Logs the FileSystem warnings to the console, filtered by 'fs_warning_level' ( !slower! ).", true, 0.f, true, 2.f, nullptr, "1 = log to console. 2 = 1 + log to notify."); + fs_showWarnings = ConVar::Create("fs_showWarnings" , "0", FCVAR_DEVELOPMENTONLY, "Logs the FileSystem warnings to the console, filtered by 'fs_warning_level' ( !slower! ).", true, 0.f, true, 2.f, nullptr, "0 = log to file. 1 = 0 + log to console. 2 = 1 + log to notify."); fs_packedstore_entryblock_stats = ConVar::Create("fs_packedstore_entryblock_stats" , "0", FCVAR_DEVELOPMENTONLY, "Logs the stats of each file entry in the VPK during decompression ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr); fs_packedstore_workspace = ConVar::Create("fs_packedstore_workspace" , "platform/ship/", FCVAR_DEVELOPMENTONLY, "Determines the current VPK workspace.", false, 0.f, false, 0.f, nullptr, nullptr); fs_packedstore_compression_level = ConVar::Create("fs_packedstore_compression_level", "default", FCVAR_DEVELOPMENTONLY, "Determines the VPK compression level.", false, 0.f, false, 0.f, nullptr, "fastest faster default better uber"); @@ -208,15 +208,12 @@ void ConVar::Init(void) //------------------------------------------------------------------------- // MATERIALSYSTEM | #ifndef DEDICATED - mat_showdxoutput = ConVar::Create("mat_showdxoutput", "0", FCVAR_DEVELOPMENTONLY | FCVAR_MATERIAL_SYSTEM_THREAD, "Shows debug output for the DirectX system.", false, 0.f, false, 0.f, nullptr, nullptr); mat_alwaysComplain = ConVar::Create("mat_alwaysComplain", "0", FCVAR_RELEASE | FCVAR_MATERIAL_SYSTEM_THREAD, "Always complain when a material is missing.", false, 0.f, false, 0.f, nullptr, nullptr); #endif // !DEDICATED //------------------------------------------------------------------------- // SQUIRREL | - sq_showrsonloading = ConVar::Create("sq_showrsonloading" , "0", FCVAR_DEVELOPMENTONLY, "Logs all RSON files loaded by the SQVM ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr); - sq_showscriptloading = ConVar::Create("sq_showscriptloading", "0", FCVAR_DEVELOPMENTONLY, "Logs all scripts loaded by the SQVM to be pre-compiled ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr); - sq_showvmoutput = ConVar::Create("sq_showvmoutput" , "0", FCVAR_RELEASE, "Prints the VM output to the console ( !slower! ).", true, 0.f, true, 2.f, nullptr, "1 = log to console. 2 = 1 + log to notify."); - sq_showvmwarning = ConVar::Create("sq_showvmwarning" , "0", FCVAR_RELEASE, "Prints the VM warning output to the console ( !slower! ).", true, 0.f, true, 2.f, nullptr, "1 = log to console. 2 = 1 + log to notify."); + script_show_output = ConVar::Create("script_show_output" , "0", FCVAR_RELEASE, "Prints the VM output to the console ( !slower! ).", true, 0.f, true, 2.f, nullptr, "0 = log to file. 1 = 0 + log to console. 2 = 1 + log to notify."); + script_show_warning = ConVar::Create("script_show_warning", "0", FCVAR_RELEASE, "Prints the VM warning output to the console ( !slower! ).", true, 0.f, true, 2.f, nullptr, "0 = log to file. 1 = 0 + log to console. 2 = 1 + log to notify."); //------------------------------------------------------------------------- // NETCHANNEL | net_tracePayload = ConVar::Create("net_tracePayload" , "0", FCVAR_DEVELOPMENTONLY , "Log the payload of the send/recv datagram to a file on the disk.", false, 0.f, false, 0.f, nullptr, nullptr); diff --git a/r5dev/tier1/cvar.cpp b/r5dev/tier1/cvar.cpp index 32a29164..2dd6b671 100644 --- a/r5dev/tier1/cvar.cpp +++ b/r5dev/tier1/cvar.cpp @@ -186,15 +186,12 @@ ConVar* fs_packedstore_max_helper_threads = nullptr; //----------------------------------------------------------------------------- // MATERIALSYSTEM | #ifndef DEDICATED -ConVar* mat_showdxoutput = nullptr; ConVar* mat_alwaysComplain = nullptr; #endif // !DEDICATED //----------------------------------------------------------------------------- // SQUIRREL | -ConVar* sq_showrsonloading = nullptr; -ConVar* sq_showscriptloading = nullptr; -ConVar* sq_showvmoutput = nullptr; -ConVar* sq_showvmwarning = nullptr; +ConVar* script_show_output = nullptr; +ConVar* script_show_warning = nullptr; //----------------------------------------------------------------------------- // NETCHANNEL | ConVar* net_tracePayload = nullptr; diff --git a/r5dev/tier1/cvar.h b/r5dev/tier1/cvar.h index 396f6363..12cba5b1 100644 --- a/r5dev/tier1/cvar.h +++ b/r5dev/tier1/cvar.h @@ -182,15 +182,12 @@ extern ConVar* fs_packedstore_max_helper_threads; //------------------------------------------------------------------------- // MATERIALSYSTEM | #ifndef DEDICATED -extern ConVar* mat_showdxoutput; extern ConVar* mat_alwaysComplain; #endif // !DEDICATED //------------------------------------------------------------------------- // SQUIRREL | -extern ConVar* sq_showrsonloading; -extern ConVar* sq_showscriptloading; -extern ConVar* sq_showvmoutput; -extern ConVar* sq_showvmwarning; +extern ConVar* script_show_output; +extern ConVar* script_show_warning; //------------------------------------------------------------------------- // NETCHANNEL | extern ConVar* net_tracePayload;