diff --git a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp index 8662449..a72dbed 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp @@ -1014,7 +1014,7 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason) //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); + LogMessage("in CS_OnTerminateRound being hard stuck. switching map to default start map. timeleft: %i", timeleft); CreateTimer(1.0, Timer_fall_back_map_switch, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } return Plugin_Continue; @@ -1035,8 +1035,18 @@ public Action unfreeze_players2(Handle hTimer, Handle dp) public Action Timer_fall_back_map_switch(Handle hTimer, Handle dp) { - ForceChangeLevel("ze_random_v9", "nobody voted at mapvote"); - return Plugin_Handled; + char map_line[256]; + File f = OpenFile("cfg/defaultmap.cfg", "r"); + if (f != null) + { + f.ReadLine(map_line, sizeof(map_line)); + CloseHandle(f); + } + ReplaceString(map_line, sizeof(map_line), "map ", ""); + TrimString(map_line); + //LogMessage("map_line: %s", map_line); + ForceChangeLevel(map_line, "nobody voted at mapvote"); + return Plugin_Handled; } /* You ask, why don't you just use team_score event? And I answer... Because CSS doesn't. */