diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-20 02:14:17 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-20 02:14:17 +0100 |
commit | 958d03d2817e312c8eb70234f1c65e4bcbded716 (patch) | |
tree | e7fd88a8e6a5ececdd46abf9b95c7a2e82eb2b98 /NorthstarDedicatedTest/convar.cpp | |
parent | a71d52ffd1531a4a03cb4c87dc56ace4f5cb33c1 (diff) | |
download | NorthstarLauncher-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.cpp | 5 |
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; } |