From b565748324b829d0e511d15a7f1d9bce5a636851 Mon Sep 17 00:00:00 2001 From: Alex Evgrashin Date: Sun, 21 Feb 2021 07:13:49 +0300 Subject: [PATCH] Fixes gasp on start (#3311) --- .../GameObjects/Components/Body/Behavior/LungBehavior.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs index f85b38b39f..00d8be4d71 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Body.Circulatory; using Content.Server.GameObjects.Components.Body.Respiratory; using Content.Server.Utility; using Content.Shared.Atmos; +using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Mobs.State; using Robust.Shared.IoC; using Robust.Shared.Localization; @@ -62,6 +63,12 @@ namespace Content.Server.GameObjects.Components.Body.Behavior () => GaspPopupCooldown.TotalSeconds); } + protected override void OnAddedToBody(IBody body) + { + base.OnAddedToBody(body); + Inhale(CycleDelay); + } + public void Gasp() { if (_gameTiming.CurTime >= _lastGaspPopupTime + GaspPopupCooldown)