Fix being able to breathe in crit. (#6629)
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user