]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make Zombie, Initial Infected fix (#26665)
authorWrexbe (Josh) <81056464+wrexbe@users.noreply.github.com>
Thu, 4 Apr 2024 08:37:50 +0000 (01:37 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 08:37:50 +0000 (02:37 -0600)
Make zombie fix

Content.Server/GameTicking/Rules/ZombieRuleSystem.cs

index 0b7cb9cf8f7aefad78ee3b352e8d212662155891..54e8bcf8b708ffddfcd1ed220153ff7a2f57b31b 100644 (file)
@@ -249,7 +249,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
             _playerManager.Sessions,
             component.PatientZeroPrototypeId,
             includeAllJobs: false,
-            customExcludeCondition: player => HasComp<ZombieImmuneComponent>(player) || HasComp<InitialInfectedExemptComponent>(player) 
+            customExcludeCondition: player => HasComp<ZombieImmuneComponent>(player) || HasComp<InitialInfectedExemptComponent>(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<ZombieRuleComponent>
             acceptableAntags: Shared.Antag.AntagAcceptability.All,
             includeAllJobs: false ,
             ignorePreferences: true,
-            customExcludeCondition: HasComp<ZombieImmuneComponent> 
+            customExcludeCondition: HasComp<ZombieImmuneComponent>
             );
 
         //If there are no players to choose, abort
@@ -293,6 +293,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
 
         //Add the role to the mind silently (to avoid repeating job assignment)
         _roles.MindAddRole(mind, new InitialInfectedRoleComponent { PrototypeId = component.PatientZeroPrototypeId }, silent: true);
+        EnsureComp<InitialInfectedComponent>(entity);
 
         //Add the zombie components and grace period
         var pending = EnsureComp<PendingZombieComponent>(entity);