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; }