From 7fd559dafdeaa9a213aec24377bae79640fe175c Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sun, 6 Mar 2022 14:28:04 +1300 Subject: [PATCH] fix blood loss divide by zero (#7004) --- Content.Server/Body/Systems/BloodstreamSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 78e1b784a6..cc0b65137a 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Content.Server.Body.Components; using Content.Server.Chemistry.EntitySystems; using Content.Server.Fluids.EntitySystems; @@ -74,7 +74,7 @@ public sealed class BloodstreamSystem : EntitySystem if (bloodPercentage < bloodstream.BloodlossThreshold) { // TODO use a better method for determining this. - var amt = bloodstream.BloodlossDamage / bloodPercentage; + var amt = bloodstream.BloodlossDamage / (0.1f + bloodPercentage); _damageableSystem.TryChangeDamage(uid, amt, true, false); }