diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-08-24 00:32:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 00:32:31 +0100 |
commit | f9bc3c9d1834cb8bd5f872b749b057c33e8b0102 (patch) | |
tree | e96e2da0d95798dd42eddf644a82a74555db858f /NorthstarDedicatedTest/chatcommand.cpp | |
parent | 812893d8219daa60f5b5b7fd22cbd6b175603399 (diff) | |
download | NorthstarLauncher-f9bc3c9d1834cb8bd5f872b749b057c33e8b0102.tar.gz NorthstarLauncher-f9bc3c9d1834cb8bd5f872b749b057c33e8b0102.zip |
Adjust folder structure (#242)
* Adjust folder structure
* change launcher directory name
Diffstat (limited to 'NorthstarDedicatedTest/chatcommand.cpp')
-rw-r--r-- | NorthstarDedicatedTest/chatcommand.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/NorthstarDedicatedTest/chatcommand.cpp b/NorthstarDedicatedTest/chatcommand.cpp deleted file mode 100644 index 2aa51737..00000000 --- a/NorthstarDedicatedTest/chatcommand.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "pch.h" -#include "convar.h" -#include "concommand.h" -#include "chatcommand.h" -#include "localchatwriter.h" - -// note: isIngameChat is an int64 because the whole register the arg is stored in needs to be 0'd out to work -// if isIngameChat is false, we use network chat instead -typedef void(__fastcall* ClientSayTextType)(void* a1, const char* message, __int64 isIngameChat, bool isTeamChat); -ClientSayTextType ClientSayText; - -void ConCommand_say(const CCommand& args) -{ - if (args.ArgC() >= 2) - ClientSayText(nullptr, args.ArgS(), true, false); -} - -void ConCommand_say_team(const CCommand& args) -{ - if (args.ArgC() >= 2) - ClientSayText(nullptr, args.ArgS(), true, true); -} - -void ConCommand_log(const CCommand& args) -{ - if (args.ArgC() >= 2) - { - LocalChatWriter(LocalChatWriter::GameContext).WriteLine(args.ArgS()); - } -} - -void InitialiseChatCommands(HMODULE baseAddress) -{ - ClientSayText = (ClientSayTextType)((char*)baseAddress + 0x54780); - RegisterConCommand("say", ConCommand_say, "Enters a message in public chat", FCVAR_CLIENTDLL); - RegisterConCommand("say_team", ConCommand_say_team, "Enters a message in team chat", FCVAR_CLIENTDLL); - RegisterConCommand("log", ConCommand_log, "Log a message to the local chat window", FCVAR_CLIENTDLL); -} |