From 1723ba407bebb73aa86baad742110f04d9774bc0 Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Tue, 14 Oct 2025 03:01:17 +0200 Subject: [PATCH] Add guard so justPlayed does not get set/decrease for maps in player-less dedicated servers Works in tandem with the previous commits so that justPlayed stays at 0 for all levels until someone joins. --- src/g_game.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index 9cdc2f95a..7af43ca82 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4852,6 +4852,9 @@ void G_AddMapToBuffer(mapnum_t map) break; } #else + if (dedicated && D_NumPlayers() == 0) + return; + if (mapheaderinfo[map]->justPlayed == 0) // Started playing a new map. { // Decrement every maps' justPlayed value.