aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/convar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/convar.cpp')
-rw-r--r--NorthstarDedicatedTest/convar.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/NorthstarDedicatedTest/convar.cpp b/NorthstarDedicatedTest/convar.cpp
index 324779b4..4157b42f 100644
--- a/NorthstarDedicatedTest/convar.cpp
+++ b/NorthstarDedicatedTest/convar.cpp
@@ -6,12 +6,13 @@
#include <set>
// should this be in modmanager?
-std::unordered_map<std::string, ConVar*> g_CustomConvars; // this is used in modloading code to determine whether we've registered a mod convar already
+std::unordered_map<std::string, ConVar*>
+ g_CustomConvars; // this is used in modloading code to determine whether we've registered a mod convar already
SourceInterface<ICvar>* g_pCvar;
-typedef void(*ConVarConstructorType)(ConVar* newVar, const char* name, const char* defaultValue, int flags, const char* helpString);
+typedef void (*ConVarConstructorType)(ConVar* newVar, const char* name, const char* defaultValue, int flags, const char* helpString);
ConVarConstructorType conVarConstructor;
-typedef bool(*CvarIsFlagSetType)(ConVar* self, int flags);
+typedef bool (*CvarIsFlagSetType)(ConVar* self, int flags);
CvarIsFlagSetType CvarIsFlagSet;
ConVar* RegisterConVar(const char* name, const char* defaultValue, int flags, const char* helpString)
@@ -29,8 +30,9 @@ ConVar* RegisterConVar(const char* name, const char* defaultValue, int flags, co
ConVar* FindConVar(const char* name)
{
- ICvar* icvar = *g_pCvar; // hellish call because i couldn't get icvar vtable stuff in convar.h to get the right offset for whatever reason
- typedef ConVar* (*FindConVarType)(ICvar* self, const char* varName);
+ ICvar* icvar =
+ *g_pCvar; // hellish call because i couldn't get icvar vtable stuff in convar.h to get the right offset for whatever reason
+ typedef ConVar* (*FindConVarType)(ICvar * self, const char* varName);
FindConVarType FindConVarInternal = *(FindConVarType*)((*(char**)icvar) + 128);
return FindConVarInternal(icvar, name);
}