aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/miscserverscript.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-10 22:21:29 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-10 22:21:29 +0100
commit0a9a44ce15bb772b3193fbee481768e7327db1a9 (patch)
tree855b235161de35ade7d86ce2d847483aa46b31e4 /NorthstarDLL/miscserverscript.cpp
parent2ae34b67e36b8ba05132d481876eb4ed7a826283 (diff)
downloadNorthstarLauncher-0a9a44ce15bb772b3193fbee481768e7327db1a9.tar.gz
NorthstarLauncher-0a9a44ce15bb772b3193fbee481768e7327db1a9.zip
completely remove old hooking
Diffstat (limited to 'NorthstarDLL/miscserverscript.cpp')
-rw-r--r--NorthstarDLL/miscserverscript.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDLL/miscserverscript.cpp b/NorthstarDLL/miscserverscript.cpp
index 32fd8a84..25a0cd1a 100644
--- a/NorthstarDLL/miscserverscript.cpp
+++ b/NorthstarDLL/miscserverscript.cpp
@@ -24,14 +24,14 @@ SQRESULT SQ_EarlyWritePlayerIndexPersistenceForLeave(void* sqvm)
int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1);
void* player = GetPlayerByIndex(playerIndex);
- if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player))
+ if (!g_pServerAuthenticationManager->m_additionalPlayerData.count(player))
{
g_pServerSquirrel->raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
return SQRESULT_ERROR;
}
- g_ServerAuthenticationManager->m_additionalPlayerData[player].needPersistenceWriteOnLeave = false;
- g_ServerAuthenticationManager->WritePersistentData(player);
+ g_pServerAuthenticationManager->m_additionalPlayerData[player].needPersistenceWriteOnLeave = false;
+ g_pServerAuthenticationManager->WritePersistentData(player);
return SQRESULT_NULL;
}
@@ -47,7 +47,7 @@ SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm)
{
int playerIndex = g_pServerSquirrel->getinteger(sqvm, 1);
void* player = GetPlayerByIndex(playerIndex);
- if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(player))
+ if (!g_pServerAuthenticationManager->m_additionalPlayerData.count(player))
{
g_pServerSquirrel->raiseerror(sqvm, fmt::format("Invalid playerindex {}", playerIndex).c_str());
return SQRESULT_ERROR;
@@ -57,10 +57,10 @@ SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm)
return SQRESULT_NOTNULL;
}
-ON_DLL_LOAD_RELIESON("server.dll", MiscServerScriptCommands, ServerSquirrel, [](HMODULE baseAddress)
+ON_DLL_LOAD_RELIESON("server.dll", MiscServerScriptCommands, ServerSquirrel, (HMODULE baseAddress))
{
g_pServerSquirrel->AddFuncRegistration(
"void", "NSEarlyWritePlayerIndexPersistenceForLeave", "int playerIndex", "", SQ_EarlyWritePlayerIndexPersistenceForLeave);
g_pServerSquirrel->AddFuncRegistration("bool", "NSIsWritingPlayerPersistence", "", "", SQ_IsWritingPlayerPersistence);
g_pServerSquirrel->AddFuncRegistration("bool", "NSIsPlayerIndexLocalPlayer", "int playerIndex", "", SQ_IsPlayerIndexLocalPlayer);
-}) \ No newline at end of file
+} \ No newline at end of file