aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/clientchathooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/clientchathooks.cpp')
-rw-r--r--NorthstarDedicatedTest/clientchathooks.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/NorthstarDedicatedTest/clientchathooks.cpp b/NorthstarDedicatedTest/clientchathooks.cpp
index b6cf56ac..d666072e 100644
--- a/NorthstarDedicatedTest/clientchathooks.cpp
+++ b/NorthstarDedicatedTest/clientchathooks.cpp
@@ -24,7 +24,7 @@ static void CHudChat__AddGameLineHook(void* self, const char* message, int inbox
return;
}
- if (g_ClientSquirrelManager->setupfunc("CHudChat_ProcessMessageStartThread") != SQRESULT_ERROR)
+ if (g_pClientSquirrel->setupfunc("CHudChat_ProcessMessageStartThread") != SQRESULT_ERROR)
{
int senderId = inboxId & CUSTOM_MESSAGE_INDEX_MASK;
bool isAnonymous = senderId == 0;
@@ -39,12 +39,12 @@ static void CHudChat__AddGameLineHook(void* self, const char* message, int inbox
payload = message + 1;
}
- g_ClientSquirrelManager->pusharg((int)senderId - 1);
- g_ClientSquirrelManager->pusharg(payload);
- g_ClientSquirrelManager->pusharg(isTeam);
- g_ClientSquirrelManager->pusharg(isDead);
- g_ClientSquirrelManager->pusharg(type);
- g_ClientSquirrelManager->call(5);
+ g_pClientSquirrel->pusharg((int)senderId - 1);
+ g_pClientSquirrel->pusharg(payload);
+ g_pClientSquirrel->pusharg(isTeam);
+ g_pClientSquirrel->pusharg(isDead);
+ g_pClientSquirrel->pusharg(type);
+ g_pClientSquirrel->call(5);
}
else
{
@@ -58,8 +58,8 @@ static void CHudChat__AddGameLineHook(void* self, const char* message, int inbox
// void NSChatWrite( int context, string str )
static SQRESULT SQ_ChatWrite(void* sqvm)
{
- int context = g_ClientSquirrelManager->sq_getinteger(sqvm, 1);
- const char* str = g_ClientSquirrelManager->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->sq_getinteger(sqvm, 1);
+ const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
LocalChatWriter((LocalChatWriter::Context)context).Write(str);
return SQRESULT_NOTNULL;
@@ -68,8 +68,8 @@ static SQRESULT SQ_ChatWrite(void* sqvm)
// void NSChatWriteRaw( int context, string str )
static SQRESULT SQ_ChatWriteRaw(void* sqvm)
{
- int context = g_ClientSquirrelManager->sq_getinteger(sqvm, 1);
- const char* str = g_ClientSquirrelManager->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->sq_getinteger(sqvm, 1);
+ const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
LocalChatWriter((LocalChatWriter::Context)context).InsertText(str);
return SQRESULT_NOTNULL;
@@ -78,8 +78,8 @@ static SQRESULT SQ_ChatWriteRaw(void* sqvm)
// void NSChatWriteLine( int context, string str )
static SQRESULT SQ_ChatWriteLine(void* sqvm)
{
- int context = g_ClientSquirrelManager->sq_getinteger(sqvm, 1);
- const char* str = g_ClientSquirrelManager->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->sq_getinteger(sqvm, 1);
+ const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
LocalChatWriter((LocalChatWriter::Context)context).WriteLine(str);
return SQRESULT_NOTNULL;
@@ -90,7 +90,7 @@ ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ClientChatHooks, ClientSquirrel, (HMOD
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x22E580, &CHudChat__AddGameLineHook, reinterpret_cast<LPVOID*>(&CHudChat__AddGameLine));
- g_ClientSquirrelManager->AddFuncRegistration("void", "NSChatWrite", "int context, string text", "", SQ_ChatWrite);
- g_ClientSquirrelManager->AddFuncRegistration("void", "NSChatWriteRaw", "int context, string text", "", SQ_ChatWriteRaw);
- g_ClientSquirrelManager->AddFuncRegistration("void", "NSChatWriteLine", "int context, string text", "", SQ_ChatWriteLine);
+ g_pClientSquirrel->AddFuncRegistration("void", "NSChatWrite", "int context, string text", "", SQ_ChatWrite);
+ g_pClientSquirrel->AddFuncRegistration("void", "NSChatWriteRaw", "int context, string text", "", SQ_ChatWriteRaw);
+ g_pClientSquirrel->AddFuncRegistration("void", "NSChatWriteLine", "int context, string text", "", SQ_ChatWriteLine);
})