From d3c7b9baf5877c878c24b9e9753e3e4b796308ff Mon Sep 17 00:00:00 2001 From: Amos <48657826+Mauler125@users.noreply.github.com> Date: Wed, 23 Feb 2022 21:11:35 +0100 Subject: [PATCH] Rename to make more sense --- r5dev/gameui/IConsole.cpp | 10 +++++----- r5dev/launcher/IApplication.cpp | 2 +- r5dev/tier0/cvar.cpp | 2 +- r5dev/tier0/cvar.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 9447b97d..6f9fec66 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -410,16 +410,16 @@ void CConsole::FindFromPartial(void) m_bSuggestUpdate = true; m_vsvSuggest.clear(); - for (int i = 0; i < g_vsvAllConVars.size(); i++) + for (int i = 0; i < g_vsvCommandBases.size(); i++) { if (m_vsvSuggest.size() < con_suggestion_limit->GetInt()) { - if (g_vsvAllConVars[i].find(m_szInputBuf) != std::string::npos) + if (g_vsvCommandBases[i].find(m_szInputBuf) != std::string::npos) { - if (std::find(m_vsvSuggest.begin(), m_vsvSuggest.end(), g_vsvAllConVars[i]) == m_vsvSuggest.end()) + if (std::find(m_vsvSuggest.begin(), m_vsvSuggest.end(), g_vsvCommandBases[i]) == m_vsvSuggest.end()) { std::string svValue; - ConCommandBase* pCommandBase = g_pCVar->FindCommandBase(g_vsvAllConVars[i].c_str()); + ConCommandBase* pCommandBase = g_pCVar->FindCommandBase(g_vsvCommandBases[i].c_str()); if (pCommandBase != nullptr) { @@ -452,7 +452,7 @@ void CConsole::FindFromPartial(void) } } - m_vsvSuggest.push_back(g_vsvAllConVars[i] + svValue); + m_vsvSuggest.push_back(g_vsvCommandBases[i] + svValue); } } } diff --git a/r5dev/launcher/IApplication.cpp b/r5dev/launcher/IApplication.cpp index 15cdf2ad..be7c3f8d 100644 --- a/r5dev/launcher/IApplication.cpp +++ b/r5dev/launcher/IApplication.cpp @@ -60,7 +60,7 @@ bool HModAppSystemGroup_Create(CModAppSystemGroup* modAppSystemGroup) for (auto& map : g_pCVar->DumpToMap()) { - g_vsvAllConVars.push_back(map.first.c_str()); + g_vsvCommandBases.push_back(map.first.c_str()); } g_bAppSystemInit = true; diff --git a/r5dev/tier0/cvar.cpp b/r5dev/tier0/cvar.cpp index f94d9082..5c837a4a 100644 --- a/r5dev/tier0/cvar.cpp +++ b/r5dev/tier0/cvar.cpp @@ -141,5 +141,5 @@ std::unordered_map CCVar::DumpToMap() } /////////////////////////////////////////////////////////////////////////////// -std::vector g_vsvAllConVars; +std::vector g_vsvCommandBases; CCVar* g_pCVar = reinterpret_cast(p_CEngineAPI_Connect.FindPatternSelf("48 8D 0D", ADDRESS::Direction::DOWN, 40).ResolveRelativeAddressSelf(0x3, 0x7).GetPtr()); diff --git a/r5dev/tier0/cvar.h b/r5dev/tier0/cvar.h index 45e4c57c..dd72251f 100644 --- a/r5dev/tier0/cvar.h +++ b/r5dev/tier0/cvar.h @@ -112,7 +112,7 @@ public: }; /////////////////////////////////////////////////////////////////////////////// -extern std::vector g_vsvAllConVars; +extern std::vector g_vsvCommandBases; extern CCVar* g_pCVar;