From d9c1130d8c20d99286bf3119f38090d093637b51 Mon Sep 17 00:00:00 2001 From: "Wrexbe (Josh)" <81056464+wrexbe@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:37:50 -0700 Subject: [PATCH] Make Zombie, Initial Infected fix (#26665) Make zombie fix --- Content.Server/GameTicking/Rules/ZombieRuleSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 0b7cb9cf8f..54e8bcf8b7 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -249,7 +249,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem _playerManager.Sessions, component.PatientZeroPrototypeId, includeAllJobs: false, - customExcludeCondition: player => HasComp(player) || HasComp(player) + customExcludeCondition: player => HasComp(player) || HasComp(player) ); //And get all players, excluding ZombieImmune and roles with CanBeAntag = False - to fill any leftover initial infected slots @@ -259,7 +259,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem acceptableAntags: Shared.Antag.AntagAcceptability.All, includeAllJobs: false , ignorePreferences: true, - customExcludeCondition: HasComp + customExcludeCondition: HasComp ); //If there are no players to choose, abort @@ -293,6 +293,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem //Add the role to the mind silently (to avoid repeating job assignment) _roles.MindAddRole(mind, new InitialInfectedRoleComponent { PrototypeId = component.PatientZeroPrototypeId }, silent: true); + EnsureComp(entity); //Add the zombie components and grace period var pending = EnsureComp(entity);