mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 23:38:10 +07:00
Fixed units not shooting
This commit is contained in:
@ -87,8 +87,8 @@ public abstract class BaseUnit extends Unit{
|
||||
}
|
||||
}
|
||||
|
||||
public void shoot(AmmoType type, float rotation, float translation){
|
||||
|
||||
public void shoot(AmmoType type, float rotation){
|
||||
CallEntity.onUnitShoot(this, type, rotation);
|
||||
}
|
||||
|
||||
public void targetClosestAllyFlag(BlockFlag flag){
|
||||
|
@ -196,7 +196,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
AmmoType ammo = inventory.getAmmo();
|
||||
inventory.useAmmo();
|
||||
|
||||
shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim), 4f);
|
||||
shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ public abstract class GroundUnit extends BaseUnit {
|
||||
inventory.useAmmo();
|
||||
rotate(angleTo(target));
|
||||
|
||||
shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim), 4f);
|
||||
shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim));
|
||||
}
|
||||
}else{
|
||||
moveToCore();
|
||||
|
Reference in New Issue
Block a user