experimental update to prevent mapend being stuck with nothing happening when nobody voted anything

This commit is contained in:
jenz 2026-01-27 21:56:42 +01:00
parent 29971e96fc
commit e49f0a3f3a

View File

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