mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-04 06:31:42 +07:00
Homing bullet targeting fix
This commit is contained in:
parent
e682a0f1d3
commit
d4a33c6d51
@ -522,7 +522,11 @@ public class BulletType extends Content implements Cloneable{
|
||||
t -> collidesGround && (t.team != b.team || t.damaged()) && !b.hasCollided(t.id)
|
||||
);
|
||||
}else{
|
||||
target = Units.closestTarget(b.team, realAimX, realAimY, homingRange, e -> e.checkTarget(collidesAir, collidesGround) && !b.hasCollided(e.id), t -> collidesGround && !b.hasCollided(t.id));
|
||||
if(b.aimTile != null && b.aimTile.build != null && b.aimTile.build.team != b.team && collidesGround && !b.hasCollided(b.aimTile.build.id)){
|
||||
target = b.aimTile.build;
|
||||
}else{
|
||||
target = Units.closestTarget(b.team, realAimX, realAimY, homingRange, e -> e.checkTarget(collidesAir, collidesGround) && !b.hasCollided(e.id), t -> collidesGround && !b.hasCollided(t.id));
|
||||
}
|
||||
}
|
||||
|
||||
if(target != null){
|
||||
|
Loading…
Reference in New Issue
Block a user