From e49f0a3f3a9939a91bfbd439d42f99aaf20f2227 Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 27 Jan 2026 21:56:42 +0100 Subject: [PATCH] experimental update to prevent mapend being stuck with nothing happening when nobody voted anything --- .../scripting/mapchooser_extended_avg_mapend.sp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp index 6af64b2..fee068a 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp @@ -990,6 +990,14 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason) delay = float(total_time); return Plugin_Changed; } + + //when you join the ze server as the first player and theres 0 timeleft and no map was selected the server can get stuck for 2 minutes. + //that is rather problematic because it often leads to the very first people connecting wanting to leave again because the game is stuck. + if (timeleft < 0 && g_iNextmapState == 0) + { + LogMessage("in CS_OnTerminateRound being hard stuck. switching map to ze_random_v9. timeleft: %i", timeleft); + CreateTimer(1.0, Timer_fall_back_map_switch, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); + } return Plugin_Continue; }