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
This commit is contained in:
beck-thompson
2024-07-06 20:52:18 -07:00
committed by GitHub
parent 0098d71717
commit 18df27d8e7

View 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);