diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/convar.cpp | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/convar.cpp')
-rw-r--r-- | NorthstarDedicatedTest/convar.cpp | 12 |
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); } |