aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dedicated.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-05 23:34:37 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-05 23:34:37 +0000
commit3cf310cc9f8b400a100abd1067505c89c99259ab (patch)
tree749565aef5db5b8d9c93e4aace3498c72129913b /NorthstarDedicatedTest/dedicated.cpp
parent9e8232e97db1cfe9f0f9a69bdfde5048a6290df1 (diff)
downloadNorthstarLauncher-3cf310cc9f8b400a100abd1067505c89c99259ab.tar.gz
NorthstarLauncher-3cf310cc9f8b400a100abd1067505c89c99259ab.zip
fix a bug with dedi not setting playlist max_players right
Diffstat (limited to 'NorthstarDedicatedTest/dedicated.cpp')
-rw-r--r--NorthstarDedicatedTest/dedicated.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/dedicated.cpp b/NorthstarDedicatedTest/dedicated.cpp
index 5269c5cb..a2f174ff 100644
--- a/NorthstarDedicatedTest/dedicated.cpp
+++ b/NorthstarDedicatedTest/dedicated.cpp
@@ -52,6 +52,13 @@ void RunServer(CDedicatedExports* dedicated)
spdlog::info(CommandLine()->GetCmdLine());
+ // run initial 2 ticks, 1 to initialise engine and 1 to load initial map
+ g_pEngine->Frame();
+ g_pEngine->Frame();
+
+ // to fix a bug: set current playlist again, otherwise max_players will be set wrong
+ SetCurrentPlaylist(GetCurrentPlaylistName());
+
while (g_pEngine->m_nQuitting == EngineQuitState::QUIT_NOTQUITTING)
{
g_pEngine->Frame();
@@ -483,7 +490,7 @@ PrintFatalSquirrelErrorType PrintFatalSquirrelError;
void PrintFatalSquirrelErrorHook(void* sqvm)
{
PrintFatalSquirrelError(sqvm);
- //abort();
+ g_pEngine->m_nQuitting = EngineQuitState::QUIT_TODESKTOP;
}
void InitialiseDedicatedServerGameDLL(HMODULE baseAddress)