aboutsummaryrefslogtreecommitdiff
path: root/primedev/core
diff options
context:
space:
mode:
authorF1F7Y <64418963+F1F7Y@users.noreply.github.com>2024-09-02 17:10:57 +0200
committerGitHub <noreply@github.com>2024-09-02 17:10:57 +0200
commit669fdaed4c00728e798ee911c4426a6339f93951 (patch)
tree47719b1fb865708225d580280604c4e38265c509 /primedev/core
parent96c34f64ab4ed6099d08f458178e4686dff96b00 (diff)
downloadNorthstarLauncher-669fdaed4c00728e798ee911c4426a6339f93951.tar.gz
NorthstarLauncher-669fdaed4c00728e798ee911c4426a6339f93951.zip
core: Remove use of `SourceInterface` for `CCvar` (#804)
`SourceInteface` class goes back to icepick and is not good. We have a replacement, let's use it.
Diffstat (limited to 'primedev/core')
-rw-r--r--primedev/core/convar/convar.cpp5
-rw-r--r--primedev/core/convar/cvar.cpp1
-rw-r--r--primedev/core/convar/cvar.h1
3 files changed, 2 insertions, 5 deletions
diff --git a/primedev/core/convar/convar.cpp b/primedev/core/convar/convar.cpp
index 87a1e159..802c088d 100644
--- a/primedev/core/convar/convar.cpp
+++ b/primedev/core/convar/convar.cpp
@@ -1,7 +1,7 @@
#include "bits.h"
#include "cvar.h"
#include "convar.h"
-#include "core/sourceinterface.h"
+#include "core/tier1.h"
#include <float.h>
@@ -35,8 +35,7 @@ ON_DLL_LOAD("engine.dll", ConVar, (CModule module))
g_pConVar_Vtable = module.Offset(0x67FD28);
g_pIConVar_Vtable = module.Offset(0x67FDC8);
- g_pCVarInterface = new SourceInterface<CCvar>("vstdlib.dll", "VEngineCvar007");
- g_pCVar = *g_pCVarInterface;
+ g_pCVar = Sys_GetFactoryPtr("vstdlib.dll", "VEngineCvar007").RCast<CCvar*>();
}
//-----------------------------------------------------------------------------
diff --git a/primedev/core/convar/cvar.cpp b/primedev/core/convar/cvar.cpp
index aa5f0365..78da1ad2 100644
--- a/primedev/core/convar/cvar.cpp
+++ b/primedev/core/convar/cvar.cpp
@@ -22,5 +22,4 @@ std::unordered_map<std::string, ConCommandBase*> CCvar::DumpToMap()
return allConVars;
}
-SourceInterface<CCvar>* g_pCVarInterface;
CCvar* g_pCVar;
diff --git a/primedev/core/convar/cvar.h b/primedev/core/convar/cvar.h
index beaa84f4..024f2b87 100644
--- a/primedev/core/convar/cvar.h
+++ b/primedev/core/convar/cvar.h
@@ -34,5 +34,4 @@ public:
std::unordered_map<std::string, ConCommandBase*> DumpToMap();
};
-extern SourceInterface<CCvar>* g_pCVarInterface;
extern CCvar* g_pCVar;