aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/clientchathooks.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-13 22:14:14 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-13 22:14:14 +0100
commit3f515e00d19d969fa6697a60a32e9204a05a97ee (patch)
tree833ee1c91c2740bc977b227fe32baad5b36a472f /NorthstarDedicatedTest/clientchathooks.cpp
parent904c4024c47603204a66e6b409d61e628d04d0b8 (diff)
downloadNorthstarLauncher-3f515e00d19d969fa6697a60a32e9204a05a97ee.tar.gz
NorthstarLauncher-3f515e00d19d969fa6697a60a32e9204a05a97ee.zip
move sqvm funcs into wrappers in the manager class
Diffstat (limited to 'NorthstarDedicatedTest/clientchathooks.cpp')
-rw-r--r--NorthstarDedicatedTest/clientchathooks.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/NorthstarDedicatedTest/clientchathooks.cpp b/NorthstarDedicatedTest/clientchathooks.cpp
index bdd0e8c2..80d8a295 100644
--- a/NorthstarDedicatedTest/clientchathooks.cpp
+++ b/NorthstarDedicatedTest/clientchathooks.cpp
@@ -38,12 +38,12 @@ static void CHudChat__AddGameLineHook(void* self, const char* message, int inbox
payload = message + 1;
}
- 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);
+ g_pClientSquirrel->pushinteger(g_pClientSquirrel->sqvm2, (int) senderId - 1);
+ g_pClientSquirrel->pushstring(g_pClientSquirrel->sqvm2, payload);
+ g_pClientSquirrel->pushbool(g_pClientSquirrel->sqvm2, isTeam);
+ g_pClientSquirrel->pushbool(g_pClientSquirrel->sqvm2, isDead);
+ g_pClientSquirrel->pushinteger(g_pClientSquirrel->sqvm2, type);
+ g_pClientSquirrel->call(g_pClientSquirrel->sqvm2, 5);
}
else
{
@@ -57,8 +57,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_pClientSquirrel->sq_getinteger(sqvm, 1);
- const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->getinteger(g_pClientSquirrel->sqvm2, 1);
+ const char* str = g_pClientSquirrel->getstring(g_pClientSquirrel->sqvm2, 2);
LocalChatWriter((LocalChatWriter::Context)context).Write(str);
return SQRESULT_NOTNULL;
@@ -67,8 +67,8 @@ static SQRESULT SQ_ChatWrite(void* sqvm)
// void NSChatWriteRaw( int context, string str )
static SQRESULT SQ_ChatWriteRaw(void* sqvm)
{
- int context = g_pClientSquirrel->sq_getinteger(sqvm, 1);
- const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->getinteger(g_pClientSquirrel->sqvm2, 1);
+ const char* str = g_pClientSquirrel->getstring(g_pClientSquirrel->sqvm2, 2);
LocalChatWriter((LocalChatWriter::Context)context).InsertText(str);
return SQRESULT_NOTNULL;
@@ -77,8 +77,8 @@ static SQRESULT SQ_ChatWriteRaw(void* sqvm)
// void NSChatWriteLine( int context, string str )
static SQRESULT SQ_ChatWriteLine(void* sqvm)
{
- int context = g_pClientSquirrel->sq_getinteger(sqvm, 1);
- const char* str = g_pClientSquirrel->sq_getstring(sqvm, 2);
+ int context = g_pClientSquirrel->getinteger(g_pClientSquirrel->sqvm2, 1);
+ const char* str = g_pClientSquirrel->getstring(g_pClientSquirrel->sqvm2, 2);
LocalChatWriter((LocalChatWriter::Context)context).WriteLine(str);
return SQRESULT_NOTNULL;