diff options
author | Northstar <northstar@northstar.tf> | 2022-04-13 19:29:44 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-04-13 19:30:40 -0300 |
commit | 47ea109be0d73120ddfe6896494e1fce986515b3 (patch) | |
tree | fb440b3ab2a00bf506182a9c9a9500d1c4711e0c /NorthstarDedicatedTest/serverchathooks.cpp | |
parent | 04b0b417d1c9f45a708d3e2eec9146fabe09c1d1 (diff) | |
download | NorthstarLauncher-47ea109be0d73120ddfe6896494e1fce986515b3.tar.gz NorthstarLauncher-47ea109be0d73120ddfe6896494e1fce986515b3.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/serverchathooks.cpp')
-rw-r--r-- | NorthstarDedicatedTest/serverchathooks.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/serverchathooks.cpp b/NorthstarDedicatedTest/serverchathooks.cpp index 4766bf9b..985d3d1b 100644 --- a/NorthstarDedicatedTest/serverchathooks.cpp +++ b/NorthstarDedicatedTest/serverchathooks.cpp @@ -93,7 +93,9 @@ void ChatSendMessage(unsigned int playerIndex, const char* text, bool isteam) CServerGameDLL__OnReceivedSayTextMessage( g_pServerGameDLL, // Ensure the first bit isn't set, since this indicates a custom message - (playerIndex + 1) & CUSTOM_MESSAGE_INDEX_MASK, text, isteam); + (playerIndex + 1) & CUSTOM_MESSAGE_INDEX_MASK, + text, + isteam); } void ChatBroadcastMessage(int fromPlayerIndex, int toPlayerIndex, const char* text, bool isTeam, bool isDead, CustomMessageType messageType) @@ -168,7 +170,10 @@ SQRESULT SQ_BroadcastMessage(void* sqvm) return SQRESULT_NULL; } -void InitialiseServerChatHooks_Engine(HMODULE baseAddress) { g_pServerGameDLL = (CServerGameDLL*)((char*)baseAddress + 0x13F0AA98); } +void InitialiseServerChatHooks_Engine(HMODULE baseAddress) +{ + g_pServerGameDLL = (CServerGameDLL*)((char*)baseAddress + 0x13F0AA98); +} void InitialiseServerChatHooks_Server(HMODULE baseAddress) { @@ -188,12 +193,17 @@ void InitialiseServerChatHooks_Server(HMODULE baseAddress) HookEnabler hook; ENABLER_CREATEHOOK( - hook, CServerGameDLL__OnReceivedSayTextMessage, &CServerGameDLL__OnReceivedSayTextMessageHook, + hook, + CServerGameDLL__OnReceivedSayTextMessage, + &CServerGameDLL__OnReceivedSayTextMessageHook, reinterpret_cast<LPVOID*>(&CServerGameDLL__OnReceivedSayTextMessageHookBase)); // Chat sending functions g_ServerSquirrelManager->AddFuncRegistration("void", "NSSendMessage", "int playerIndex, string text, bool isTeam", "", SQ_SendMessage); g_ServerSquirrelManager->AddFuncRegistration( - "void", "NSBroadcastMessage", "int fromPlayerIndex, int toPlayerIndex, string text, bool isTeam, bool isDead, int messageType", "", + "void", + "NSBroadcastMessage", + "int fromPlayerIndex, int toPlayerIndex, string text, bool isTeam, bool isDead, int messageType", + "", SQ_BroadcastMessage); } |