From f0d107bb8ad44a44330cfa7be3e61234a980539e Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sun, 6 Jan 2019 21:59:58 +0100 Subject: [PATCH] worldspawn: Make sure it's only called once, to avoid multiple worldspawn entities (this can happen...) from messing everything up. --- Source/Server/Main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Server/Main.c b/Source/Server/Main.c index 5ae27d1a..7139d91e 100755 --- a/Source/Server/Main.c +++ b/Source/Server/Main.c @@ -256,7 +256,15 @@ worldspawn It's the map entity, literally ================= */ +int g_initialized; + void worldspawn( void ) { + + if (g_initialized) { + return; + } + g_initialized = TRUE; + int iMOTDLines = 0; // Let's load materials.txt because someone thought this was the best idea