Possible building raycast damage fix

This commit is contained in:
Anuken 2024-04-21 10:46:50 -04:00
parent a7a9a99780
commit 430114d931

View File

@ -175,6 +175,7 @@ public class Damage{
distances.clear();
if(b.type.collidesGround && b.type.collidesTiles){
World.raycast(b.tileX(), b.tileY(), World.toTile(b.x + vec.x), World.toTile(b.y + vec.y), (x, y) -> {
//add distance to list so it can be processed
var build = world.build(x, y);
@ -190,6 +191,7 @@ public class Damage{
return false;
});
}
Units.nearbyEnemies(b.team, rect, u -> {
u.hitbox(hitrect);
@ -247,7 +249,7 @@ public class Damage{
collidedBlocks.clear();
vec.trnsExact(angle, length);
if(hitter.type.collidesGround){
if(hitter.type.collidesGround && hitter.type.collidesTiles){
seg1.set(x, y);
seg2.set(seg1).add(vec);
World.raycastEachWorld(x, y, seg2.x, seg2.y, (cx, cy) -> {