From 1884bd047ef7f4ac9e27fddf9236c5fb6304e284 Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Mon, 18 Mar 2024 14:31:07 +0300 Subject: [PATCH] hotfix --- Content.Server/Antag/AntagSelectionSystem.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index b11c562df5a..adef40414b6 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -51,8 +51,23 @@ public List GetEligiblePlayers(IEnumerable playerSess foreach (var player in playerSessions) { - if (IsPlayerEligible(player, antagPrototype, includeAllJobs, acceptableAntags, ignorePreferences, allowNonHumanoids, customExcludeCondition)) - eligiblePlayers.Add(player.AttachedEntity!.Value); + try + { + if (IsPlayerEligible(player, antagPrototype, includeAllJobs, acceptableAntags, ignorePreferences, allowNonHumanoids, customExcludeCondition)) + eligiblePlayers.Add(player.AttachedEntity!.Value); + } + catch (Exception +#if !DEBUG + err +#endif + ) + { +#if DEBUG + throw; +#else + Logger.GetSawmill("AntagSelectionSystem").Error(err.ToString()); +#endif + } } return eligiblePlayers;