From bfd04e26837a5d91ef4b432f4f83f25d72b566de Mon Sep 17 00:00:00 2001 From: MEEP of Faith Date: Tue, 6 Sep 2022 17:32:04 -0700 Subject: [PATCH] Store building pos instead of start pos Fix an explosion hitting the same building multiple times if it's larger than 1x1. --- core/src/mindustry/entities/Damage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 705b9d26c7..5b34ca4f63 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -545,7 +545,7 @@ public class Damage{ float mult = (1f-(Mathf.dst2(startX, startY, x, y) / rad2) + edgeScale) / (1f + edgeScale); float next = damage * mult - dealt; //register damage dealt - int p = Point2.pack(startX, startY); + int p = build.pos(); damages.put(p, Math.max(damages.get(p), next)); //register as hit dealt += build.health;