From d2ee7cdf425ca004b14d118dfc6254c485d2dc41 Mon Sep 17 00:00:00 2001 From: EggleEgg <125359838+EggleEgg@users.noreply.github.com> Date: Wed, 2 Sep 2026 01:59:09 +0200 Subject: [PATCH] Bugfix: laserbolt pierces plast walls (#12573) * Bugfix: laserbolt pierces plast walls * whether ugh --- core/src/mindustry/entities/bullet/BulletType.java | 2 ++ core/src/mindustry/entities/bullet/LaserBoltBulletType.java | 1 + core/src/mindustry/entities/comp/BulletComp.java | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index e0bbef2c9c..49d64c0c90 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -64,6 +64,8 @@ public class BulletType extends Content implements Cloneable{ public boolean removeAfterPierce = true; /** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */ public boolean laserAbsorb = true; + /** Whether this bullet is considered a laser bullet and thus absorbed by plastanium walls. */ + public boolean laserBullet = false; /** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */ public float optimalLifeFract = 0f; /** Z layer to drawn on. */ diff --git a/core/src/mindustry/entities/bullet/LaserBoltBulletType.java b/core/src/mindustry/entities/bullet/LaserBoltBulletType.java index b0da2cd69e..f8b091e6e9 100644 --- a/core/src/mindustry/entities/bullet/LaserBoltBulletType.java +++ b/core/src/mindustry/entities/bullet/LaserBoltBulletType.java @@ -16,6 +16,7 @@ public class LaserBoltBulletType extends BasicBulletType{ despawnEffect = Fx.hitLaser; hittable = false; reflectable = false; + laserBullet = true; lightColor = Pal.heal; lightOpacity = 0.6f; } diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index ff1dd289e2..bcc083327c 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -292,6 +292,12 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw remove(); } + if(type.laserBullet && build.absorbLasers()){ + hit = true; + remove(); + return; + } + //stop raycasting when building is hit if(type.pierceBuilding) return; }