diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-30 03:04:25 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-30 03:04:25 +0000 |
commit | a589bb0082cbae6d326644292179c9427e76e795 (patch) | |
tree | 1a40c5cb171af28a7bcd5c6ec75bcbc855bb0ef4 /NorthstarDedicatedTest/serverauthentication.cpp | |
parent | cd1631d782b1a1e4f6840e3964617bac95814dec (diff) | |
download | NorthstarLauncher-a589bb0082cbae6d326644292179c9427e76e795.tar.gz NorthstarLauncher-a589bb0082cbae6d326644292179c9427e76e795.zip |
add FindConVar and FindConCommand
Diffstat (limited to 'NorthstarDedicatedTest/serverauthentication.cpp')
-rw-r--r-- | NorthstarDedicatedTest/serverauthentication.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/serverauthentication.cpp b/NorthstarDedicatedTest/serverauthentication.cpp index f4fe25ea..d6a74008 100644 --- a/NorthstarDedicatedTest/serverauthentication.cpp +++ b/NorthstarDedicatedTest/serverauthentication.cpp @@ -372,10 +372,7 @@ char CGameClient__ExecuteStringCommandHook(void* self, uint32_t unknown, const c if (!CCommand__Tokenize(tempCommand, pCommandString, cmd_source_t::kCommandSrcCode) || !tempCommand.ArgC()) return false; - 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); - ConCommand* command = FindCommandBase(icvar, tempCommand.Arg(0)); + ConCommand* command = FindConCommand(tempCommand.Arg(0)); // if the command doesn't exist pass it on to ExecuteStringCommand for script clientcommands and stuff if (command && !command->IsFlagSet(FCVAR_CLIENTCMD_CAN_EXECUTE)) |