aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/miscserverscript.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-18 00:00:39 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-18 00:00:39 +0100
commitb0bef05111a95a4cce6250d2b79e2aa5baa6dd98 (patch)
tree5bdc39717bebfc437adf8683405d58d97e1f43b2 /NorthstarDLL/miscserverscript.cpp
parent6ae30c9b15fcc200c7b642016e7adbfdf9b979f4 (diff)
downloadNorthstarLauncher-b0bef05111a95a4cce6250d2b79e2aa5baa6dd98.tar.gz
NorthstarLauncher-b0bef05111a95a4cce6250d2b79e2aa5baa6dd98.zip
use modular ServerPresence system for registering servers
Diffstat (limited to 'NorthstarDLL/miscserverscript.cpp')
-rw-r--r--NorthstarDLL/miscserverscript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/NorthstarDLL/miscserverscript.cpp b/NorthstarDLL/miscserverscript.cpp
index 12ab5708..1b075079 100644
--- a/NorthstarDLL/miscserverscript.cpp
+++ b/NorthstarDLL/miscserverscript.cpp
@@ -11,7 +11,7 @@
SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm)
{
int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1);
- R2::CBasePlayer* player = R2::UTIL_PlayerByIndex(playerIndex);
+ R2::CBaseClient* player = &R2::g_pClientArray[playerIndex];
if (!g_pServerAuthentication->m_PlayerAuthenticationData.count(player))
{
@@ -35,7 +35,7 @@ SQRESULT SQ_IsWritingPlayerPersistence(void* sqvm)
SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm)
{
int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1);
- R2::CBasePlayer* player = R2::UTIL_PlayerByIndex(playerIndex);
+ R2::CBaseClient* player = &R2::g_pClientArray[playerIndex];
if (!g_pServerAuthentication->m_PlayerAuthenticationData.count(player))
{
g_pServerSquirrel->raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());