diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-09 03:48:14 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-09 03:48:14 +0100 |
commit | 037113d4b8032cd3715d879c2f4b08f66fa2be43 (patch) | |
tree | cf294f53b28ebb207e497877c8ee3fce39dd5e10 /NorthstarDedicatedTest/serverchathooks.cpp | |
parent | 9ab7c43c34183915273cc8b5ccedd72568249b27 (diff) | |
download | NorthstarLauncher-037113d4b8032cd3715d879c2f4b08f66fa2be43.tar.gz NorthstarLauncher-037113d4b8032cd3715d879c2f4b08f66fa2be43.zip |
move sqvm funcs to sq managers
Diffstat (limited to 'NorthstarDedicatedTest/serverchathooks.cpp')
-rw-r--r-- | NorthstarDedicatedTest/serverchathooks.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/NorthstarDedicatedTest/serverchathooks.cpp b/NorthstarDedicatedTest/serverchathooks.cpp index ad037a5f..98f1bdc1 100644 --- a/NorthstarDedicatedTest/serverchathooks.cpp +++ b/NorthstarDedicatedTest/serverchathooks.cpp @@ -142,9 +142,9 @@ void ChatBroadcastMessage(int fromPlayerIndex, int toPlayerIndex, const char* te SQRESULT SQ_SendMessage(void* sqvm) { - int playerIndex = ServerSq_getinteger(sqvm, 1); - const char* text = ServerSq_getstring(sqvm, 2); - bool isTeam = ServerSq_getbool(sqvm, 3); + int playerIndex = g_ServerSquirrelManager->sq_getinteger(sqvm, 1); + const char* text = g_ServerSquirrelManager->sq_getstring(sqvm, 2); + bool isTeam = g_ServerSquirrelManager->sq_getbool(sqvm, 3); ChatSendMessage(playerIndex, text, isTeam); @@ -153,16 +153,16 @@ SQRESULT SQ_SendMessage(void* sqvm) SQRESULT SQ_BroadcastMessage(void* sqvm) { - int fromPlayerIndex = ServerSq_getinteger(sqvm, 1); - int toPlayerIndex = ServerSq_getinteger(sqvm, 2); - const char* text = ServerSq_getstring(sqvm, 3); - bool isTeam = ServerSq_getbool(sqvm, 4); - bool isDead = ServerSq_getbool(sqvm, 5); - int messageType = ServerSq_getinteger(sqvm, 6); + int fromPlayerIndex = g_ServerSquirrelManager->sq_getinteger(sqvm, 1); + int toPlayerIndex = g_ServerSquirrelManager->sq_getinteger(sqvm, 2); + const char* text = g_ServerSquirrelManager->sq_getstring(sqvm, 3); + bool isTeam = g_ServerSquirrelManager->sq_getbool(sqvm, 4); + bool isDead = g_ServerSquirrelManager->sq_getbool(sqvm, 5); + int messageType = g_ServerSquirrelManager->sq_getinteger(sqvm, 6); if (messageType < 1) { - ServerSq_pusherror(sqvm, fmt::format("Invalid message type {}", messageType).c_str()); + g_ServerSquirrelManager->sq_raiseerror(sqvm, fmt::format("Invalid message type {}", messageType).c_str()); return SQRESULT_ERROR; } |