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){
|
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user