aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/serverchathooks.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-21 00:17:48 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-21 00:17:48 +0100
commit0c729c609cd052f4e720ce885c1d5322b63c9edd (patch)
tree1e9c47ab45d9d684a8c0994e6331a6311a2ceaed /NorthstarDLL/serverchathooks.cpp
parent841881af9ea6ec73b1d505d5a8f7c1f766273724 (diff)
downloadNorthstarLauncher-0c729c609cd052f4e720ce885c1d5322b63c9edd.tar.gz
NorthstarLauncher-0c729c609cd052f4e720ce885c1d5322b63c9edd.zip
fix up squirrel sq_getentity defs
Diffstat (limited to 'NorthstarDLL/serverchathooks.cpp')
-rw-r--r--NorthstarDLL/serverchathooks.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/NorthstarDLL/serverchathooks.cpp b/NorthstarDLL/serverchathooks.cpp
index 1dd05830..31844c67 100644
--- a/NorthstarDLL/serverchathooks.cpp
+++ b/NorthstarDLL/serverchathooks.cpp
@@ -37,7 +37,7 @@ void(__fastcall* MessageWriteBool)(bool bValue);
bool bShouldCallSayTextHook = false;
// clang-format off
AUTOHOOK(_CServerGameDLL__OnReceivedSayTextMessage, server.dll + 0x1595C0,
-void, __fastcall, (CServerGameDLL* self, unsigned int senderPlayerId, const char* text, bool isTeam))
+void, __fastcall, (CServerGameDLL* self, unsigned int nSenderPlayerIndex, const char* text, bool isTeam))
// clang-format on
{
// MiniHook doesn't allow calling the base function outside of anywhere but the hook function.
@@ -45,23 +45,23 @@ void, __fastcall, (CServerGameDLL* self, unsigned int senderPlayerId, const char
if (bShouldCallSayTextHook)
{
bShouldCallSayTextHook = false;
- _CServerGameDLL__OnReceivedSayTextMessage(self, senderPlayerId, text, isTeam);
+ _CServerGameDLL__OnReceivedSayTextMessage(self, nSenderPlayerIndex, text, isTeam);
return;
}
// check chat ratelimits
- if (!g_pServerLimits->CheckChatLimits(&R2::g_pClientArray[senderPlayerId - 1]))
+ if (!g_pServerLimits->CheckChatLimits(&R2::g_pClientArray[nSenderPlayerIndex - 1]))
return;
if (g_pSquirrel<ScriptContext::SERVER>->setupfunc("CServerGameDLL_ProcessMessageStartThread") != SQRESULT_ERROR)
{
- g_pSquirrel<ScriptContext::SERVER>->pushinteger(g_pSquirrel<ScriptContext::SERVER>->m_pSQVM->sqvm, (int)senderPlayerId - 1);
+ g_pSquirrel<ScriptContext::SERVER>->pushinteger(g_pSquirrel<ScriptContext::SERVER>->m_pSQVM->sqvm, (int)nSenderPlayerIndex - 1);
g_pSquirrel<ScriptContext::SERVER>->pushstring(g_pSquirrel<ScriptContext::SERVER>->m_pSQVM->sqvm, text);
g_pSquirrel<ScriptContext::SERVER>->pushbool(g_pSquirrel<ScriptContext::SERVER>->m_pSQVM->sqvm, isTeam);
g_pSquirrel<ScriptContext::SERVER>->call(g_pSquirrel<ScriptContext::SERVER>->m_pSQVM->sqvm, 3);
}
else
- _CServerGameDLL__OnReceivedSayTextMessage(self, senderPlayerId, text, isTeam);
+ _CServerGameDLL__OnReceivedSayTextMessage(self, nSenderPlayerIndex, text, isTeam);
}
void ChatSendMessage(unsigned int playerIndex, const char* text, bool isTeam)