From b0bef05111a95a4cce6250d2b79e2aa5baa6dd98 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Mon, 18 Jul 2022 00:00:39 +0100 Subject: use modular ServerPresence system for registering servers --- NorthstarDLL/miscserverscript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NorthstarDLL/miscserverscript.cpp') 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()); -- cgit v1.2.3