mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Minor turret targeting fix
This commit is contained in:
parent
5712190dab
commit
961331c832
@ -210,7 +210,7 @@ public class Turret extends ReloadTurret{
|
||||
}
|
||||
|
||||
public void targetPosition(Posc pos){
|
||||
if(!hasAmmo() || target == null) return;
|
||||
if(!hasAmmo() || pos == null) return;
|
||||
BulletType bullet = peekAmmo();
|
||||
float speed = bullet.speed;
|
||||
//slow bullets never intersect
|
||||
@ -218,7 +218,7 @@ public class Turret extends ReloadTurret{
|
||||
|
||||
targetPos.set(Predict.intercept(this, pos, speed));
|
||||
if(targetPos.isZero()){
|
||||
targetPos.set(target);
|
||||
targetPos.set(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user