mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 16:00:51 -07:00
Bullet fix
This commit is contained in:
parent
40bb0ddf39
commit
8876c673f7
1 changed files with 1 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ public abstract class BulletType extends Content{
|
|||
|
||||
public void update(Bulletc b){
|
||||
if(homingPower > 0.0001f){
|
||||
Teamc target = Units.closestTarget(b.team(), b.getX(), b.getY(), homingRange, e -> e.isGrounded() || collidesAir);
|
||||
Teamc target = Units.closestTarget(b.team(), b.getX(), b.getY(), homingRange, e -> (e.isGrounded() && collidesGround) || (e.isFlying() && collidesAir));
|
||||
if(target != null){
|
||||
b.vel().setAngle(Mathf.slerpDelta(b.rotation(), b.angleTo(target), 0.08f));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue