From 0e8ac9ce792dd9665c8b5514cc6fb4a79ca92d68 Mon Sep 17 00:00:00 2001 From: Whisper <121047731+QuietlyWhisper@users.noreply.github.com> Date: Fri, 26 May 2023 03:23:29 -0400 Subject: [PATCH] fixes crit people being seen as dead for bleed purposes (#16827) --- Content.Server/Body/Systems/BloodstreamSystem.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 017d92a9c9..0080c9f311 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -93,8 +93,10 @@ public sealed class BloodstreamSystem : EntitySystem bloodstream.AccumulatedFrametime -= bloodstream.UpdateInterval; // Adds blood to their blood level if it is below the maximum; Blood regeneration. Must be alive. - if (bloodstream.BloodSolution.Volume < bloodstream.BloodSolution.MaxVolume && _mobStateSystem.IsAlive(uid)) + if (bloodstream.BloodSolution.Volume < bloodstream.BloodSolution.MaxVolume && !_mobStateSystem.IsDead(uid)) + { TryModifyBloodLevel(uid, bloodstream.BloodRefreshAmount, bloodstream); + } // Removes blood from the bloodstream based on bleed amount (bleed rate) // as well as stop their bleeding to a certain extent. @@ -108,7 +110,7 @@ public sealed class BloodstreamSystem : EntitySystem // deal bloodloss damage if their blood level is below a threshold. var bloodPercentage = GetBloodLevelPercentage(uid, bloodstream); - if (bloodPercentage < bloodstream.BloodlossThreshold && _mobStateSystem.IsAlive(uid)) + if (bloodPercentage < bloodstream.BloodlossThreshold && !_mobStateSystem.IsDead(uid)) { // bloodloss damage is based on the base value, and modified by how low your blood level is. var amt = bloodstream.BloodlossDamage / (0.1f + bloodPercentage); @@ -123,8 +125,8 @@ public sealed class BloodstreamSystem : EntitySystem // storing the drunk and stutter time so we can remove it independently from other effects additions bloodstream.StatusTime += bloodstream.UpdateInterval * 2; - } - else if (_mobStateSystem.IsAlive(uid)) + } + else if (!_mobStateSystem.IsDead(uid)) { // If they're healthy, we'll try and heal some bloodloss instead. _damageableSystem.TryChangeDamage(uid, bloodstream.BloodlossHealDamage * bloodPercentage, true, false);