Fixed units not shooting

This commit is contained in:
Anuken
2018-06-10 14:46:04 -04:00
parent f56247df7a
commit a9b5949a7b
3 changed files with 4 additions and 4 deletions
@@ -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){ public void targetClosestAllyFlag(BlockFlag flag){
@@ -196,7 +196,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
AmmoType ammo = inventory.getAmmo(); AmmoType ammo = inventory.getAmmo();
inventory.useAmmo(); 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(); inventory.useAmmo();
rotate(angleTo(target)); rotate(angleTo(target));
shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim), 4f); shoot(ammo, Angles.moveToward(rotation, angleTo(target), maxAim));
} }
}else{ }else{
moveToCore(); moveToCore();