aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/miscserverscript.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-21 00:17:48 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-21 00:17:48 +0100
commit0c729c609cd052f4e720ce885c1d5322b63c9edd (patch)
tree1e9c47ab45d9d684a8c0994e6331a6311a2ceaed /NorthstarDLL/miscserverscript.cpp
parent841881af9ea6ec73b1d505d5a8f7c1f766273724 (diff)
downloadNorthstarLauncher-0c729c609cd052f4e720ce885c1d5322b63c9edd.tar.gz
NorthstarLauncher-0c729c609cd052f4e720ce885c1d5322b63c9edd.zip
fix up squirrel sq_getentity defs
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 ca2a5b61..758323ef 100644
--- a/NorthstarDLL/miscserverscript.cpp
+++ b/NorthstarDLL/miscserverscript.cpp
@@ -20,7 +20,7 @@ SQRESULT SQ_EarlyWritePlayerPersistenceForLeave(HSquirrelVM* sqvm)
return SQRESULT_NOTNULL;
}
- R2::CBaseClient* pClient = &R2::g_pClientArray[pPlayer->m_nPlayerIndex];
+ R2::CBaseClient* pClient = &R2::g_pClientArray[pPlayer->m_nPlayerIndex - 1];
if (g_pServerAuthentication->m_PlayerAuthenticationData.find(pClient) == g_pServerAuthentication->m_PlayerAuthenticationData.end())
{
g_pSquirrel<ScriptContext::SERVER>->pushbool(sqvm, false);
@@ -51,7 +51,7 @@ SQRESULT SQ_IsPlayerLocalPlayer(HSquirrelVM* sqvm)
return SQRESULT_NOTNULL;
}
- R2::CBaseClient* pClient = &R2::g_pClientArray[pPlayer->m_nPlayerIndex];
+ R2::CBaseClient* pClient = &R2::g_pClientArray[pPlayer->m_nPlayerIndex - 1];
g_pSquirrel<ScriptContext::SERVER>->pushbool(sqvm, !strcmp(R2::g_pLocalPlayerUserID, pClient->m_UID));
return SQRESULT_NOTNULL;
}