aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/miscserverscript.cpp
diff options
context:
space:
mode:
authorKawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>2022-06-16 20:11:23 +0200
committerKawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>2022-06-16 20:11:23 +0200
commit50bb5f3cdd9141dfb48c0d3cb46db185c9c0f708 (patch)
treed25771ef538351e50ccb67ddcd787bb7a6841b06 /NorthstarDedicatedTest/miscserverscript.cpp
parent9bba38c67bb2d7af40df89ece9505ade4bdf0d92 (diff)
parent8e5b7802fb013fac614268809f03885454998d30 (diff)
downloadNorthstarLauncher-50bb5f3cdd9141dfb48c0d3cb46db185c9c0f708.tar.gz
NorthstarLauncher-50bb5f3cdd9141dfb48c0d3cb46db185c9c0f708.zip
Merge branch 'NetCon' of https://github.com/Mauler125/NorthstarLauncher into NetCon
Diffstat (limited to 'NorthstarDedicatedTest/miscserverscript.cpp')
-rw-r--r--NorthstarDedicatedTest/miscserverscript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/miscserverscript.cpp b/NorthstarDedicatedTest/miscserverscript.cpp
index b2bf52ec..3b06ca10 100644
--- a/NorthstarDedicatedTest/miscserverscript.cpp
+++ b/NorthstarDedicatedTest/miscserverscript.cpp
@@ -4,6 +4,7 @@
#include "masterserver.h"
#include "serverauthentication.h"
#include "gameutils.h"
+#include "dedicated.h"
// annoying helper function because i can't figure out getting players or entities from sqvm rn
// wish i didn't have to do it like this, but here we are
@@ -57,10 +58,19 @@ SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm)
return SQRESULT_NOTNULL;
}
+// bool function NSIsDedicated()
+
+SQRESULT SQ_IsDedicated(void* sqvm)
+{
+ ServerSq_pushbool(sqvm, IsDedicated());
+ return SQRESULT_NOTNULL;
+}
+
void InitialiseMiscServerScriptCommand(HMODULE baseAddress)
{
g_ServerSquirrelManager->AddFuncRegistration(
"void", "NSEarlyWritePlayerIndexPersistenceForLeave", "int playerIndex", "", SQ_EarlyWritePlayerIndexPersistenceForLeave);
g_ServerSquirrelManager->AddFuncRegistration("bool", "NSIsWritingPlayerPersistence", "", "", SQ_IsWritingPlayerPersistence);
g_ServerSquirrelManager->AddFuncRegistration("bool", "NSIsPlayerIndexLocalPlayer", "int playerIndex", "", SQ_IsPlayerIndexLocalPlayer);
+ g_ServerSquirrelManager->AddFuncRegistration("bool", "NSIsDedicated", "", "", SQ_IsDedicated);
} \ No newline at end of file