Fix Admin-spawned Nukies not counting as dead (#23103)

fix(NukeopsRuleSystem): admin created nukeops not count as dead
This commit is contained in:
Dakamakat
2023-12-28 20:16:04 +03:00
committed by GitHub
parent 33ccd5cc93
commit ff77e830d3

View File

@@ -1023,9 +1023,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
_roles.MindAddRole(mindId, new NukeopsRoleComponent { PrototypeId = NukeopsId }, mind); _roles.MindAddRole(mindId, new NukeopsRoleComponent { PrototypeId = NukeopsId }, mind);
if (mind.CurrentEntity != null) if (mind.CurrentEntity != null)
{ {
foreach (var (nukeops, gameRule) in EntityQuery<NukeopsRuleComponent, GameRuleComponent>()) foreach (var (nukeops, _) in EntityQuery<NukeopsRuleComponent, GameRuleComponent>())
{ {
nukeops.OperativePlayers.Add(mind.CharacterName!, mind.CurrentEntity.GetValueOrDefault()); nukeops.OperativePlayers.Add(mind.CharacterName!, mindId);
} }
} }