aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/miscserverscript.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 03:48:14 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 03:48:14 +0100
commit037113d4b8032cd3715d879c2f4b08f66fa2be43 (patch)
treecf294f53b28ebb207e497877c8ee3fce39dd5e10 /NorthstarDedicatedTest/miscserverscript.cpp
parent9ab7c43c34183915273cc8b5ccedd72568249b27 (diff)
downloadNorthstarLauncher-037113d4b8032cd3715d879c2f4b08f66fa2be43.tar.gz
NorthstarLauncher-037113d4b8032cd3715d879c2f4b08f66fa2be43.zip
move sqvm funcs to sq managers
Diffstat (limited to 'NorthstarDedicatedTest/miscserverscript.cpp')
-rw-r--r--NorthstarDedicatedTest/miscserverscript.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/miscserverscript.cpp b/NorthstarDedicatedTest/miscserverscript.cpp
index 0f66d386..3c32ad1c 100644
--- a/NorthstarDedicatedTest/miscserverscript.cpp
+++ b/NorthstarDedicatedTest/miscserverscript.cpp
@@ -22,12 +22,12 @@ void* GetPlayerByIndex(int playerIndex)
// void function NSEarlyWritePlayerIndexPersistenceForLeave( int playerIndex )
SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm)
{
- int playerIndex = ServerSq_getinteger(sqvm, 1);
+ int playerIndex = g_ServerSquirrelManager->sq_getinteger(sqvm, 1);
void* player = GetPlayerByIndex(playerIndex);
if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player))
{
- ServerSq_pusherror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
+ g_ServerSquirrelManager->sq_raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
return SQRESULT_ERROR;
}
@@ -39,22 +39,22 @@ SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm)
// bool function NSIsWritingPlayerPersistence()
SQRESULT SQ_IsWritingPlayerPersistence(void* sqvm)
{
- ServerSq_pushbool(sqvm, g_MasterServerManager->m_bSavingPersistentData);
+ g_ServerSquirrelManager->sq_pushbool(sqvm, g_MasterServerManager->m_bSavingPersistentData);
return SQRESULT_NOTNULL;
}
// bool function NSIsPlayerIndexLocalPlayer( int playerIndex )
SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm)
{
- int playerIndex = ServerSq_getinteger(sqvm, 1);
+ int playerIndex = g_ServerSquirrelManager->sq_getinteger(sqvm, 1);
void* player = GetPlayerByIndex(playerIndex);
if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player))
{
- ServerSq_pusherror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
+ g_ServerSquirrelManager->sq_raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
return SQRESULT_ERROR;
}
- ServerSq_pushbool(sqvm, !strcmp(g_LocalPlayerUserID, (char*)player + 0xF500));
+ g_ServerSquirrelManager->sq_pushbool(sqvm, !strcmp(g_LocalPlayerUserID, (char*)player + 0xF500));
return SQRESULT_NOTNULL;
}