diff --git a/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs index 4c60bdecfb..cf402231ec 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs @@ -8,6 +8,7 @@ using Content.Server.GameObjects.Components.Body.Respiratory; using Content.Server.Utility; using Content.Shared.Atmos; using Content.Shared.GameObjects.Components.Body.Behavior; +using Content.Shared.GameObjects.Components.Mobs.State; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Localization; @@ -99,6 +100,11 @@ namespace Content.Server.GameObjects.Components.Body.Behavior public override void Update(float frameTime) { + if (Body != null && Body.Owner.TryGetComponent(out IMobStateComponent? mobState) && mobState.IsCritical()) + { + return; + } + if (Status == LungStatus.None) { Status = LungStatus.Inhaling; diff --git a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs index 180e73897b..b9f98a6ec4 100644 --- a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs +++ b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs @@ -206,10 +206,13 @@ namespace Content.Server.GameObjects.Components.Metabolism if (bloodstreamAmount < amountNeeded) { - // Panic inhale - foreach (var lung in lungs) + if (!Owner.GetComponent().IsCritical()) { - lung.Gasp(); + // Panic inhale + foreach (var lung in lungs) + { + lung.Gasp(); + } } bloodstreamAmount = bloodstream.Air.GetMoles(gas);