From 016e535deabd4ea93688d4026be846d2e2f52acc Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:42:55 +1100 Subject: [PATCH] Maybe fix dead bug (#24445) --- Content.Shared/Body/Systems/SharedBodySystem.Parts.cs | 2 +- Content.Shared/Body/Systems/SharedBodySystem.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs index a1056568ab..970eee6943 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs @@ -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("Bloodloss"), 300); diff --git a/Content.Shared/Body/Systems/SharedBodySystem.cs b/Content.Shared/Body/Systems/SharedBodySystem.cs index 431503c96e..a45966fcc3 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.cs @@ -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 /// 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!; -- 2.51.2