mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 22:12:16 -08:00
Laser damage intersect fix
This commit is contained in:
parent
67344ffd7d
commit
bf91676fea
1 changed files with 3 additions and 1 deletions
|
|
@ -169,7 +169,9 @@ public class Damage{
|
|||
});
|
||||
|
||||
Units.nearbyEnemies(b.team, rect, u -> {
|
||||
if(u.checkTarget(b.type.collidesAir, b.type.collidesGround) && u.hittable()){
|
||||
u.hitbox(hitrect);
|
||||
|
||||
if(u.checkTarget(b.type.collidesAir, b.type.collidesGround) && u.hittable() && Intersector.intersectSegmentRectangle(b.x, b.y, b.x + vec.x, b.y + vec.y, hitrect)){
|
||||
distances.add(u.dst(b));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue