This commit is contained in:
Anuken
2020-09-22 23:32:34 -04:00
parent b601dc5deb
commit 6b43697891
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -82,10 +82,10 @@ public class Damage{
furthest = null;
world.raycast(b.tileX(), b.tileY(), world.toTile(b.x + Tmp.v1.x), world.toTile(b.y + Tmp.v1.y),
boolean found = world.raycast(b.tileX(), b.tileY(), world.toTile(b.x + Tmp.v1.x), world.toTile(b.y + Tmp.v1.y),
(x, y) -> (furthest = world.tile(x, y)) != null && furthest.team() != b.team && furthest.block().absorbLasers);
return furthest != null ? Math.max(6f, b.dst(furthest.worldx(), furthest.worldy())) : length;
return found && furthest != null ? Math.max(6f, b.dst(furthest.worldx(), furthest.worldy())) : length;
}
/** Collides a bullet with blocks in a laser, taking into account absorption blocks. Resulting length is stored in the bullet's fdata. */