From 0438b5c8cfa99ac01c7e142d959aa40f88f1cc70 Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:24:07 +0000 Subject: Cherry pick "remove unnecessary namespaces" from primedev (#618) Cherry-picks the removal of unnecessary namespaces from `primedev` https://github.com/F1F7Y/NorthstarPrime/ Co-authored-by: F1F7Y --- NorthstarDLL/core/convar/convar.cpp | 6 +++--- NorthstarDLL/core/convar/cvar.cpp | 8 ++------ NorthstarDLL/core/convar/cvar.h | 8 ++------ 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'NorthstarDLL/core/convar') diff --git a/NorthstarDLL/core/convar/convar.cpp b/NorthstarDLL/core/convar/convar.cpp index 594989c2..e77ae1fd 100644 --- a/NorthstarDLL/core/convar/convar.cpp +++ b/NorthstarDLL/core/convar/convar.cpp @@ -38,14 +38,14 @@ ON_DLL_LOAD("engine.dll", ConVar, (CModule module)) g_pConVar_Vtable = module.Offset(0x67FD28); g_pIConVar_Vtable = module.Offset(0x67FDC8); - R2::g_pCVarInterface = new SourceInterface("vstdlib.dll", "VEngineCvar007"); - R2::g_pCVar = *R2::g_pCVarInterface; + g_pCVarInterface = new SourceInterface("vstdlib.dll", "VEngineCvar007"); + g_pCVar = *g_pCVarInterface; g_pPluginCommunicationhandler->m_sEngineData.conVarMalloc = reinterpret_cast(conVarMalloc); g_pPluginCommunicationhandler->m_sEngineData.conVarRegister = reinterpret_cast(conVarRegister); g_pPluginCommunicationhandler->m_sEngineData.ConVar_Vtable = reinterpret_cast(g_pConVar_Vtable); g_pPluginCommunicationhandler->m_sEngineData.IConVar_Vtable = reinterpret_cast(g_pIConVar_Vtable); - g_pPluginCommunicationhandler->m_sEngineData.g_pCVar = reinterpret_cast(R2::g_pCVar); + g_pPluginCommunicationhandler->m_sEngineData.g_pCVar = reinterpret_cast(g_pCVar); } //----------------------------------------------------------------------------- diff --git a/NorthstarDLL/core/convar/cvar.cpp b/NorthstarDLL/core/convar/cvar.cpp index 21f8d2ec..aa5f0365 100644 --- a/NorthstarDLL/core/convar/cvar.cpp +++ b/NorthstarDLL/core/convar/cvar.cpp @@ -22,9 +22,5 @@ std::unordered_map CCvar::DumpToMap() return allConVars; } -// use the R2 namespace for game funcs -namespace R2 -{ - SourceInterface* g_pCVarInterface; - CCvar* g_pCVar; -} // namespace R2 +SourceInterface* g_pCVarInterface; +CCvar* g_pCVar; diff --git a/NorthstarDLL/core/convar/cvar.h b/NorthstarDLL/core/convar/cvar.h index 3a3e1815..09fa8591 100644 --- a/NorthstarDLL/core/convar/cvar.h +++ b/NorthstarDLL/core/convar/cvar.h @@ -34,9 +34,5 @@ class CCvar std::unordered_map DumpToMap(); }; -// use the R2 namespace for game funcs -namespace R2 -{ - extern SourceInterface* g_pCVarInterface; - extern CCvar* g_pCVar; -} // namespace R2 +extern SourceInterface* g_pCVarInterface; +extern CCvar* g_pCVar; -- cgit v1.2.3