diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-15 14:23:30 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-15 14:23:30 +0000 |
commit | b467313c6b36f1da07189a127c2ad50d6b085a53 (patch) | |
tree | 9c868ced94504e861c11f8cb0c79553d548c7b3f /NorthstarDedicatedTest/dedicated.cpp | |
parent | e272e2b2d2898029c4fd2c285db24e2d4b70a0f2 (diff) | |
download | NorthstarLauncher-b467313c6b36f1da07189a127c2ad50d6b085a53.tar.gz NorthstarLauncher-b467313c6b36f1da07189a127c2ad50d6b085a53.zip |
run server autoexec after engine init from cbuf rather than commandline parm to allow stuffcmds to work
Diffstat (limited to 'NorthstarDedicatedTest/dedicated.cpp')
-rw-r--r-- | NorthstarDedicatedTest/dedicated.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/dedicated.cpp b/NorthstarDedicatedTest/dedicated.cpp index 1359a33e..641fb42e 100644 --- a/NorthstarDedicatedTest/dedicated.cpp +++ b/NorthstarDedicatedTest/dedicated.cpp @@ -50,6 +50,11 @@ void RunServer(CDedicatedExports* dedicated) // run initial 2 ticks, 1 to initialise engine and 1 to load initial map g_pEngine->Frame(); + + // run server autoexec + Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec autoexec_ns_server", cmd_source_t::kCommandSrcCode); + Cbuf_Execute(); + g_pEngine->Frame(); // to fix a bug: set current playlist again, otherwise max_players will be set wrong @@ -406,7 +411,7 @@ void InitialiseDedicated(HMODULE engineAddress) CommandLine()->AppendParm("-windowed", 0); CommandLine()->AppendParm("+host_preload_shaders", "0"); CommandLine()->AppendParm("+net_usesocketsforloopback", "1"); - CommandLine()->AppendParm("+exec", "autoexec_ns_server"); + //CommandLine()->AppendParm("+exec", "autoexec_ns_server"); // Disable Quick Edit mode to reduce chance of user unintentionally hanging their server by selecting something. if (!CommandLine()->CheckParm("-bringbackquickedit")) |