]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Maybe fix dead bug (#24445)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 24 Jan 2024 02:42:55 +0000 (13:42 +1100)
committerGitHub <noreply@github.com>
Wed, 24 Jan 2024 02:42:55 +0000 (18:42 -0800)
Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
Content.Shared/Body/Systems/SharedBodySystem.cs

index a1056568abc4a606ece12630c6c0b0bb87ebcb1d..970eee694386023c483a1b237a9c2d03958684d6 100644 (file)
@@ -172,7 +172,7 @@ public partial class SharedBodySystem
         if (!Resolve(parent, ref bodyComp, false))
             return;
 
-        if (component.IsVital && !GetBodyChildrenOfType(parent, component.PartType, bodyComp).Any())
+        if (_timing.IsFirstTimePredicted && component.IsVital && !GetBodyChildrenOfType(parent, component.PartType, bodyComp).Any())
         {
             // TODO BODY SYSTEM KILL : remove this when wounding and required parts are implemented properly
             var damage = new DamageSpecifier(Prototypes.Index<DamageTypePrototype>("Bloodloss"), 300);
index 431503c96e2d263941219d668ae9ccaa6e12caae..a45966fcc375129bc59f4e28f74493308313a24e 100644 (file)
@@ -3,6 +3,7 @@ using Content.Shared.Movement.Systems;
 using Content.Shared.Standing;
 using Robust.Shared.Containers;
 using Robust.Shared.Prototypes;
+using Robust.Shared.Timing;
 
 namespace Content.Shared.Body.Systems;
 
@@ -27,6 +28,7 @@ public abstract partial class SharedBodySystem : EntitySystem
     /// </summary>
     public const string OrganSlotContainerIdPrefix = "body_organ_slot_";
 
+    [Dependency] private   readonly IGameTiming _timing = default!;
     [Dependency] protected readonly IPrototypeManager Prototypes = default!;
     [Dependency] protected readonly DamageableSystem Damageable = default!;
     [Dependency] protected readonly MovementSpeedModifierSystem Movement = default!;