aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/serverscriptpersistence.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-19 02:18:24 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-19 02:18:24 +0100
commited7e4fed4ddedaf9d4c181052ca552a0914d57bb (patch)
tree0d451e40d82b0513c4f2acd42ea750638b1d4c88 /NorthstarDedicatedTest/serverscriptpersistence.cpp
parent9b8a6d155a7a2cf1bfb4e8d98980bfb0b6e94d92 (diff)
downloadNorthstarLauncher-ed7e4fed4ddedaf9d4c181052ca552a0914d57bb.tar.gz
NorthstarLauncher-ed7e4fed4ddedaf9d4c181052ca552a0914d57bb.zip
add masterserver mod list support and fix some squirrel issues
Diffstat (limited to 'NorthstarDedicatedTest/serverscriptpersistence.cpp')
-rw-r--r--NorthstarDedicatedTest/serverscriptpersistence.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/NorthstarDedicatedTest/serverscriptpersistence.cpp b/NorthstarDedicatedTest/serverscriptpersistence.cpp
deleted file mode 100644
index 4f7bba88..00000000
--- a/NorthstarDedicatedTest/serverscriptpersistence.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "pch.h"
-#include "serverscriptpersistence.h"
-#include "squirrel.h"
-#include "masterserver.h"
-#include "serverauthentication.h"
-
-// void function NSEarlyWritePlayerPersistenceForLeave( entity player )
-SQInteger SQ_EarlyWritePlayerPersistenceForLeave(void* sqvm)
-{
- void* player;
- if (!ServerSq_getentity(sqvm, &player) || !g_ServerAuthenticationManager->m_additionalPlayerData.count(player))
- return 0;
-
- g_ServerAuthenticationManager->m_additionalPlayerData[player].needPersistenceWriteOnLeave = false;
- g_ServerAuthenticationManager->WritePersistentData(player);
- return 0;
-}
-
-// bool function NSIsWritingPlayerPersistence()
-SQInteger SQ_IsWritingPlayerPersistence(void* sqvm)
-{
- ServerSq_pushbool(sqvm, g_MasterServerManager->m_savingPersistentData);
- return 1;
-}
-
-void InitialiseServerScriptPersistence(HMODULE baseAddress)
-{
- g_ServerSquirrelManager->AddFuncRegistration("void", "NSEarlyWritePlayerPersistenceForLeave", "entity player", "", SQ_EarlyWritePlayerPersistenceForLeave);
- g_ServerSquirrelManager->AddFuncRegistration("bool", "NSIsWritingPlayerPersistence", "", "", SQ_IsWritingPlayerPersistence);
-} \ No newline at end of file