Fix being able to breathe in crit. (#6629)

This commit is contained in:
Leon Friedrich
2022-02-11 08:04:04 +13:00
committed by GitHub
parent 5b6078d630
commit fa309bb318

View File

@@ -61,6 +61,8 @@ namespace Content.Server.Body.Systems
respirator.AccumulatedFrametime -= respirator.CycleDelay; respirator.AccumulatedFrametime -= respirator.CycleDelay;
UpdateSaturation(respirator.Owner, -respirator.CycleDelay, respirator); UpdateSaturation(respirator.Owner, -respirator.CycleDelay, respirator);
if (!state.IsIncapacitated()) // cannot breathe in crit.
{
switch (respirator.Status) switch (respirator.Status)
{ {
case RespiratorStatus.Inhaling: case RespiratorStatus.Inhaling:
@@ -72,6 +74,7 @@ namespace Content.Server.Body.Systems
respirator.Status = RespiratorStatus.Inhaling; respirator.Status = RespiratorStatus.Inhaling;
break; break;
} }
}
if (respirator.Saturation < respirator.SuffocationThreshold) if (respirator.Saturation < respirator.SuffocationThreshold)
{ {