Consider spectators for waiting filter condition

This commit is contained in:
Kevin Streser
2024-05-06 10:44:54 +02:00
committed by Gustas
parent 8c174551f5
commit cbcd413ed1
2 changed files with 2 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ Also thanks to:
* Kanar * Kanar
* Kenny Hoxworth (hoxworth) * Kenny Hoxworth (hoxworth)
* Kevin Azzam (ChaoticMind) * Kevin Azzam (ChaoticMind)
* Kevin Streser
* Krishnakanth Mallik * Krishnakanth Mallik
* Kyle Smith (Smitty) * Kyle Smith (Smitty)
* Kyrre Soerensen (zypres) * Kyrre Soerensen (zypres)

View File

@@ -844,7 +844,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (game.State == (int)ServerState.GameStarted && !filters.HasFlag(MPGameFilters.Started)) if (game.State == (int)ServerState.GameStarted && !filters.HasFlag(MPGameFilters.Started))
return true; return true;
if (game.State == (int)ServerState.WaitingPlayers && !filters.HasFlag(MPGameFilters.Waiting) && game.Players != 0) if (game.State == (int)ServerState.WaitingPlayers && !filters.HasFlag(MPGameFilters.Waiting) && game.Players + game.Spectators != 0)
return true; return true;
if (game.Players + game.Spectators == 0 && !filters.HasFlag(MPGameFilters.Empty)) if (game.Players + game.Spectators == 0 && !filters.HasFlag(MPGameFilters.Empty))