Skip to content

Commit

Permalink
фикс AntagSelectionSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jul 27, 2024
1 parent ee3b214 commit 60c1f85
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Content.Server/Antag/AntagSelectionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,19 @@ protected override void Started(EntityUid uid, AntagSelectionComponent component
if (component.SelectionsComplete)
return;

// Sunrise-Start
var players = _playerManager.Sessions
.Where(x => GameTicker.PlayerGameStatuses[x.UserId] == PlayerGameStatus.JoinedGame)
.Where(x =>
{
// Try to get the PlayerGameStatus for the current player's UserId
if (GameTicker.PlayerGameStatuses.TryGetValue(x.UserId, out var status))
{
return status == PlayerGameStatus.JoinedGame;
}
return false;
})
.ToList();
// Sunrise-End

ChooseAntags((uid, component), players, midround: true);
}
Expand Down

0 comments on commit 60c1f85

Please sign in to comment.