diff --git a/addons/sourcemod/plugins/optional/l4d2_queue.smx b/addons/sourcemod/plugins/optional/l4d2_queue.smx index b8aa39a0a..dc966cb16 100644 Binary files a/addons/sourcemod/plugins/optional/l4d2_queue.smx and b/addons/sourcemod/plugins/optional/l4d2_queue.smx differ diff --git a/addons/sourcemod/scripting/l4d2_queue.sp b/addons/sourcemod/scripting/l4d2_queue.sp index 8430e2a03..aa47b936e 100644 --- a/addons/sourcemod/scripting/l4d2_queue.sp +++ b/addons/sourcemod/scripting/l4d2_queue.sp @@ -91,6 +91,9 @@ void Enqueue(int client) void RequeuePlayers() { + if (IsNewGame()) + return; + Player player; bool survivorsAreWinning = SurvivorsAreWinning(); @@ -105,17 +108,27 @@ void RequeuePlayers() continue; int team = GetClientTeam(client); - if (team != L4D2_TEAM_SURVIVOR && team != L4D2_TEAM_INFECTED) + + if (team == L4D2_TEAM_SURVIVOR) + { + player.priority = survivorsAreWinning ? 0.0 : GetEngineTime(); + h_Queue.SetArray(i, player); + continue; + } + + if (team == L4D2_TEAM_INFECTED) + { + player.priority = infectedAreWinning ? 0.0 : GetEngineTime(); + h_Queue.SetArray(i, player); continue; + } - if (survivorsAreWinning && team == L4D2_TEAM_SURVIVOR) - player.priority = 0.0; - else if (infectedAreWinning && team == L4D2_TEAM_INFECTED) - player.priority = 0.0; - else + if (player.priority == 0.0) + { player.priority = GetEngineTime(); - - h_Queue.SetArray(i, player); + h_Queue.SetArray(i, player); + continue; + } } SortQueue(); @@ -224,7 +237,7 @@ void PrintQueue(int target) else CPrintToChat(target, output); - output[0] = '\0'; + output = ""; } }