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/concommand.cpp | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/concommand.cpp')
-rw-r--r-- | NorthstarDedicatedTest/concommand.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/concommand.cpp b/NorthstarDedicatedTest/concommand.cpp index 2952e7e7..b876a05c 100644 --- a/NorthstarDedicatedTest/concommand.cpp +++ b/NorthstarDedicatedTest/concommand.cpp @@ -4,10 +4,11 @@ #include "misccommands.h" #include <iostream> -typedef void(*ConCommandConstructorType)(ConCommand* newCommand, const char* name, void(*callback)(const CCommand&), const char* helpString, int flags, void* parent); +typedef void (*ConCommandConstructorType)( + ConCommand* newCommand, const char* name, void (*callback)(const CCommand&), const char* helpString, int flags, void* parent); ConCommandConstructorType conCommandConstructor; -void RegisterConCommand(const char* name, void(*callback)(const CCommand&), const char* helpString, int flags) +void RegisterConCommand(const char* name, void (*callback)(const CCommand&), const char* helpString, int flags) { spdlog::info("Registering ConCommand {}", name); @@ -18,8 +19,9 @@ void RegisterConCommand(const char* name, void(*callback)(const CCommand&), cons ConCommand* FindConCommand(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 ConCommand* (*FindCommandBaseType)(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 ConCommand* (*FindCommandBaseType)(ICvar * self, const char* varName); FindCommandBaseType FindCommandBase = *(FindCommandBaseType*)((*(char**)icvar) + 112); return FindCommandBase(icvar, name); } |