Stay warmed up while charging (#7410)

* Stay warmed up while charging

* Same with unit weapons

also add lenearWarmup
This commit is contained in:
MEEPofFaith
2022-08-21 17:11:13 -04:00
committed by GitHub
parent 1c3538321b
commit 9811aa03ec
2 changed files with 10 additions and 2 deletions
@@ -343,7 +343,7 @@ public class Turret extends ReloadTurret{
public void updateTile(){
if(!validateTarget()) target = null;
float warmupTarget = isShooting() && canConsume() ? 1f : 0f;
float warmupTarget = (isShooting() && canConsume()) || charging() ? 1f : 0f;
if(linearWarmup){
shootWarmup = Mathf.approachDelta(shootWarmup, warmupTarget, shootWarmupSpeed * (warmupTarget > 0 ? efficiency : 1f));
}else{