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,16 +61,19 @@ 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);
switch (respirator.Status) if (!state.IsIncapacitated()) // cannot breathe in crit.
{ {
case RespiratorStatus.Inhaling: switch (respirator.Status)
Inhale(uid, body); {
respirator.Status = RespiratorStatus.Exhaling; case RespiratorStatus.Inhaling:
break; Inhale(uid, body);
case RespiratorStatus.Exhaling: respirator.Status = RespiratorStatus.Exhaling;
Exhale(uid, body); break;
respirator.Status = RespiratorStatus.Inhaling; case RespiratorStatus.Exhaling:
break; Exhale(uid, body);
respirator.Status = RespiratorStatus.Inhaling;
break;
}
} }
if (respirator.Saturation < respirator.SuffocationThreshold) if (respirator.Saturation < respirator.SuffocationThreshold)