From e5202a8f9270bc5597ee9025da371ce84acd0129 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 16 Feb 2026 11:58:42 -0500 Subject: [PATCH] Fixed #11672 --- core/src/mindustry/entities/comp/BulletComp.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index f89e2e9860..9bb9fc2691 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -263,7 +263,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw return; } }else{ - boolean remove = false; + boolean remove = false, doRemove = false; float health = build.health; if(build.team != team){ @@ -278,13 +278,16 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw if(!type.pierceBuilding){ hit = true; - remove(); + doRemove = true; }else{ collided.add(build.id); } } type.hitTile(self(), build, x * tilesize, y * tilesize, health, true); + if(doRemove){ + remove(); + } //stop raycasting when building is hit if(type.pierceBuilding) return;