aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-11 23:35:40 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-11 23:35:40 +0100
commitc5cf48bba33159fc268904688f29ed20c14b11b3 (patch)
tree88aa6d01bf204f93ece63e50d3f1b9b4ca263094 /NorthstarDedicatedTest/masterserver.cpp
parentcb386ef4857f5a0f13998d1813cfa7d57a00af7d (diff)
downloadNorthstarLauncher-c5cf48bba33159fc268904688f29ed20c14b11b3.tar.gz
NorthstarLauncher-c5cf48bba33159fc268904688f29ed20c14b11b3.zip
add server script early persistence writes
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.cpp')
-rw-r--r--NorthstarDedicatedTest/masterserver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp
index d7f966db..36b360a1 100644
--- a/NorthstarDedicatedTest/masterserver.cpp
+++ b/NorthstarDedicatedTest/masterserver.cpp
@@ -5,6 +5,7 @@
#include "hookutils.h"
#include "httplib.h"
#include "serverauthentication.h"
+#include "gameutils.h"
#include "rapidjson/document.h"
#include "rapidjson/error/en.h"
@@ -560,7 +561,7 @@ void CHostState__State_NewGameHook(CHostState* hostState)
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec autoexec_ns_server", cmd_source_t::kCommandSrcCode);
Cbuf_Execute();
- g_MasterServerManager->AddSelfToServerList(Cvar_hostport->m_nValue, Cvar_ns_player_auth_port->m_nValue, Cvar_ns_server_name->m_pszString, Cvar_ns_server_desc->m_pszString, hostState->m_levelName, (char*)GetCurrentPlaylistName(), 16, Cvar_ns_server_password->m_pszString);
+ g_MasterServerManager->AddSelfToServerList(Cvar_hostport->m_nValue, Cvar_ns_player_auth_port->m_nValue, Cvar_ns_server_name->m_pszString, Cvar_ns_server_desc->m_pszString, hostState->m_levelName, (char*)GetCurrentPlaylistName(), std::stoi(GetCurrentPlaylistVar("max_players", true)), Cvar_ns_server_password->m_pszString);
g_ServerAuthenticationManager->StartPlayerAuthServer();
CHostState__State_NewGame(hostState);