]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Spilling reagents on mutliple entities at once fix (#29763)
authorbeck-thompson <107373427+beck-thompson@users.noreply.github.com>
Sun, 7 Jul 2024 03:52:18 +0000 (20:52 -0700)
committerGitHub <noreply@github.com>
Sun, 7 Jul 2024 03:52:18 +0000 (13:52 +1000)
* Fixed!

* That could have been bad this is why I'm glad I check the diff xD

Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs

index 8cdae84a9362c7db575a5427f84bc7591ad6e379..e722108e147ecd0acdf52f7db73cf5bec2f02a71 100644 (file)
@@ -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<ReactiveComponent>(hit))
+                hitCount -= 1;
+        }
+
         foreach (var hit in args.HitEntities)
         {
             if (!HasComp<ReactiveComponent>(hit))
-            {
-                hitCount -= 1; // so we don't undershoot solution calculation for actual reactive entities
                 continue;
-            }
 
             var splitSolution = _solutionContainerSystem.SplitSolution(soln.Value, totalSplit / hitCount);