From 119c15fa2d8f1b047f527c59abe14504050cbf4a Mon Sep 17 00:00:00 2001 From: Simon <63975668+Simyon264@users.noreply.github.com> Date: Tue, 17 Dec 2024 05:14:45 +0100 Subject: [PATCH] fix round end summary --- .../SuspicionGameRule/SuspicionRuleSystem.Utility.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Server/_SSS/SuspicionGameRule/SuspicionRuleSystem.Utility.cs b/Content.Server/_SSS/SuspicionGameRule/SuspicionRuleSystem.Utility.cs index b7cdcf2b5e..b07bbe6e4c 100644 --- a/Content.Server/_SSS/SuspicionGameRule/SuspicionRuleSystem.Utility.cs +++ b/Content.Server/_SSS/SuspicionGameRule/SuspicionRuleSystem.Utility.cs @@ -88,13 +88,16 @@ private void AddTcToPlayer(EntityUid player, int amount, bool displayMessage = t var allMinds = new HashSet>(); if (filterDead) { - allMinds = _mindSystem.GetAliveHumans(EntityUid.Invalid); + allMinds = _mindSystem.GetAliveHumans(); } else { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var mind, out var mindComp, out _)) + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out _)) { + if (!_mindSystem.TryGetMind(uid, out var mind, out var mindComp)) + continue; + allMinds.Add(new Entity(mind, mindComp)); } }