diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-13 22:14:14 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-13 22:14:14 +0100 |
commit | 3f515e00d19d969fa6697a60a32e9204a05a97ee (patch) | |
tree | 833ee1c91c2740bc977b227fe32baad5b36a472f /NorthstarDedicatedTest/miscserverscript.cpp | |
parent | 904c4024c47603204a66e6b409d61e628d04d0b8 (diff) | |
download | NorthstarLauncher-3f515e00d19d969fa6697a60a32e9204a05a97ee.tar.gz NorthstarLauncher-3f515e00d19d969fa6697a60a32e9204a05a97ee.zip |
move sqvm funcs into wrappers in the manager class
Diffstat (limited to 'NorthstarDedicatedTest/miscserverscript.cpp')
-rw-r--r-- | NorthstarDedicatedTest/miscserverscript.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/miscserverscript.cpp b/NorthstarDedicatedTest/miscserverscript.cpp index 26c18d81..9e8d26ff 100644 --- a/NorthstarDedicatedTest/miscserverscript.cpp +++ b/NorthstarDedicatedTest/miscserverscript.cpp @@ -21,12 +21,12 @@ void* GetPlayerByIndex(int playerIndex) // void function NSEarlyWritePlayerIndexPersistenceForLeave( int playerIndex ) SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm) { - int playerIndex = g_pServerSquirrel->sq_getinteger(sqvm, 1); + int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1); void* player = GetPlayerByIndex(playerIndex); if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player)) { - g_pServerSquirrel->sq_raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str()); + g_pServerSquirrel->raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str()); return SQRESULT_ERROR; } @@ -38,22 +38,22 @@ SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm) // bool function NSIsWritingPlayerPersistence() SQRESULT SQ_IsWritingPlayerPersistence(void* sqvm) { - g_pServerSquirrel->sq_pushbool(sqvm, g_MasterServerManager->m_bSavingPersistentData); + g_pServerSquirrel->pushbool(sqvm, g_MasterServerManager->m_bSavingPersistentData); return SQRESULT_NOTNULL; } // bool function NSIsPlayerIndexLocalPlayer( int playerIndex ) SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm) { - int playerIndex = g_pServerSquirrel->sq_getinteger(sqvm, 1); + int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1); void* player = GetPlayerByIndex(playerIndex); if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player)) { - g_pServerSquirrel->sq_raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str()); + g_pServerSquirrel->raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str()); return SQRESULT_ERROR; } - g_pServerSquirrel->sq_pushbool(sqvm, !strcmp(R2::g_LocalPlayerUserID, (char*)player + 0xF500)); + g_pServerSquirrel->pushbool(sqvm, !strcmp(R2::g_LocalPlayerUserID, (char*)player + 0xF500)); return SQRESULT_NOTNULL; } |