From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Sun, 7 Jul 2024 03:52:18 +0000 (-0700) Subject: Spilling reagents on mutliple entities at once fix (#29763) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=18df27d8e708117f64f50624c582bf0d6d0f5287;p=space-station-14.git Spilling reagents on mutliple entities at once fix (#29763) * Fixed! * That could have been bad this is why I'm glad I check the diff xD --- diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs index 8cdae84a93..e722108e14 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs @@ -70,13 +70,18 @@ public sealed partial class PuddleSystem return; args.Handled = true; + + // First update the hit count so anything that is not reactive wont count towards the total! + foreach (var hit in args.HitEntities) + { + if (!HasComp(hit)) + hitCount -= 1; + } + foreach (var hit in args.HitEntities) { if (!HasComp(hit)) - { - hitCount -= 1; // so we don't undershoot solution calculation for actual reactive entities continue; - } var splitSolution = _solutionContainerSystem.SplitSolution(soln.Value, totalSplit / hitCount);