aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/convar.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-20 02:14:17 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-20 02:14:17 +0100
commit958d03d2817e312c8eb70234f1c65e4bcbded716 (patch)
treee7fd88a8e6a5ececdd46abf9b95c7a2e82eb2b98 /NorthstarDedicatedTest/convar.cpp
parenta71d52ffd1531a4a03cb4c87dc56ace4f5cb33c1 (diff)
downloadNorthstarLauncher-958d03d2817e312c8eb70234f1c65e4bcbded716.tar.gz
NorthstarLauncher-958d03d2817e312c8eb70234f1c65e4bcbded716.zip
add basic mod support with support for mod convars
Diffstat (limited to 'NorthstarDedicatedTest/convar.cpp')
-rw-r--r--NorthstarDedicatedTest/convar.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/convar.cpp b/NorthstarDedicatedTest/convar.cpp
index 18828a27..ca5d8ef3 100644
--- a/NorthstarDedicatedTest/convar.cpp
+++ b/NorthstarDedicatedTest/convar.cpp
@@ -1,5 +1,8 @@
#include "pch.h"
#include "convar.h"
+#include <set>
+
+std::set<std::string> g_CustomConvars; // this is used in modloading code to determine whether we've registered a mod convar already
typedef void(*ConVarConstructorType)(ConVar* newVar, const char* name, const char* defaultValue, int flags, const char* helpString);
ConVarConstructorType conVarConstructor;
@@ -12,6 +15,8 @@ ConVar* RegisterConVar(const char* name, const char* defaultValue, int flags, co
ConVar* newVar = new ConVar;
conVarConstructor(newVar, name, defaultValue, flags, helpString);
+ g_CustomConvars.insert(name);
+
return newVar;
}