From 8385726a5fc53526c12e70867d4385ebadefe540 Mon Sep 17 00:00:00 2001 From: Zwelf Date: Sat, 14 May 2022 21:48:40 +0200 Subject: [PATCH] Fix server loading map twice on startup --- src/engine/server/server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 37c6e62e7..c3d3eb0c8 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -2383,6 +2383,8 @@ void CServer::ChangeMap(const char *pMap) int CServer::LoadMap(const char *pMapName) { + m_MapReload = false; + char aBuf[IO_MAX_PATH_LENGTH]; str_format(aBuf, sizeof(aBuf), "maps/%s.map", pMapName); GameServer()->OnMapChange(aBuf, sizeof(aBuf)); @@ -2602,8 +2604,6 @@ int CServer::Run() // load new map TODO: don't poll this if(m_MapReload) { - m_MapReload = false; - // load map if(LoadMap(Config()->m_SvMap)) {