From b030a51485d48b76cfd89b07fbec8017fe7f9c24 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:49:22 -0700 Subject: [PATCH] If it don't collide, don't collide (#8388) --- core/src/mindustry/entities/Damage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index fe1ab35290..4c2106e70b 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -160,7 +160,7 @@ public class Damage{ //add distance to list so it can be processed var build = world.build(x, y); - if(build != null && build.team != b.team && b.checkUnderBuild(build, x * tilesize, y * tilesize)){ + if(build != null && build.team != b.team && build.collide(b) && b.checkUnderBuild(build, x * tilesize, y * tilesize)){ distances.add(b.dst(build)); if(b.type.laserAbsorb && build.absorbLasers()){ @@ -237,7 +237,7 @@ public class Damage{ seg2.set(seg1).add(vec); World.raycastEachWorld(x, y, seg2.x, seg2.y, (cx, cy) -> { Building tile = world.build(cx, cy); - boolean collide = tile != null && hitter.checkUnderBuild(tile, cx * tilesize, cy * tilesize) + boolean collide = tile != null && tile.collide(hitter) && hitter.checkUnderBuild(tile, cx * tilesize, cy * tilesize) && ((tile.team != team && tile.collide(hitter)) || hitter.type.testCollision(hitter, tile)) && collidedBlocks.add(tile.pos()); if(collide){ collided.add(collidePool.obtain().set(cx * tilesize, cy * tilesize, tile));