Final bugfixes

This commit is contained in:
Anuken
2020-12-01 08:39:16 -05:00
parent c0c5257ed8
commit ee28f4564b
3 changed files with 8 additions and 2 deletions

View File

@@ -345,7 +345,11 @@ public class Turret extends ReloadTurret{
/** @return whether the turret has ammo. */
public boolean hasAmmo(){
return ammo.size > 0 && ammo.peek().amount >= 1;
//skip first entry if it has less than the required amount of ammo
if(ammo.size >= 2 && ammo.peek().amount < ammoPerShot){
ammo.pop();
}
return ammo.size > 0 && ammo.peek().amount >= ammoPerShot;
}
protected void updateShooting(){