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

View File

@@ -1597,8 +1597,10 @@ public class Blocks implements ContentList{
health = 220 * size * size;
shootSound = Sounds.shotgun;
float brange = range + 10f;
ammo(Items.thorium, new ShrapnelBulletType(){{
length = range + 10f;
length = brange;
damage = 105f;
ammoMultiplier = 6f;
}});

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. */