Fixes gasp on start (#3311)

This commit is contained in:
Alex Evgrashin
2021-02-21 07:13:49 +03:00
committed by GitHub
parent b1be93fbce
commit b565748324

View File

@@ -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)