aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest')
-rw-r--r--NorthstarDedicatedTest/dedicated.cpp9
-rw-r--r--NorthstarDedicatedTest/memalloc.cpp2
2 files changed, 9 insertions, 2 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)
diff --git a/NorthstarDedicatedTest/memalloc.cpp b/NorthstarDedicatedTest/memalloc.cpp
index c7cfbb6a..113f56b9 100644
--- a/NorthstarDedicatedTest/memalloc.cpp
+++ b/NorthstarDedicatedTest/memalloc.cpp
@@ -12,7 +12,7 @@
// then just use the game's allocator after that
// yes, this means we leak 100k of memory, idk how else to do this without breaking stuff
-const int STATIC_ALLOC_SIZE = 100000;
+const int STATIC_ALLOC_SIZE = 100000; // alot more than we need, could reduce to 50k or even 25k later potentially
size_t g_iStaticAllocated = 0;
char pStaticAllocBuf[STATIC_ALLOC_SIZE];