Bullet/weapon cleanup

This commit is contained in:
Anuken
2022-02-23 17:02:00 -05:00
parent a6c9ce7612
commit 8234aa1b98
13 changed files with 149 additions and 144 deletions

View File

@@ -37,7 +37,7 @@ public class SuicideAI extends GroundAI{
if(!Units.invalidateTarget(target, unit, unit.range()) && unit.hasWeapons()){
rotate = true;
shoot = unit.within(target, unit.type.weapons.first().bullet.range() +
shoot = unit.within(target, unit.type.weapons.first().bullet.range +
(target instanceof Building b ? b.block.size * Vars.tilesize / 2f : ((Hitboxc)target).hitSize() / 2f));
//do not move toward walls or transport blocks