This commit is contained in:
Anuken
2022-07-20 15:58:24 -04:00
parent 1a39bcaef0
commit 25a1d125c8

View File

@@ -167,7 +167,9 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
//direct hit on correct tile
(aimTile != null && aimTile.build == build) ||
//a piercing bullet overshot the aim tile, it's fine to hit things now
(type.pierce && aimTile != null && Mathf.dst(x, y, originX, originY) > aimTile.dst(originX, originY) + 2f));
(type.pierce && aimTile != null && Mathf.dst(x, y, originX, originY) > aimTile.dst(originX, originY) + 2f) ||
//there was nothing to aim at
(aimX == -1f && aimY == -1f));
}
//copy-paste of World#raycastEach, inlined for lambda capture performance.