New WIP missile turret
This commit is contained in:
@@ -208,8 +208,6 @@ public class Turret extends ReloadTurret{
|
||||
public float curRecoil, heat, logicControlTime = -1;
|
||||
public float shootWarmup, charge;
|
||||
public int totalShots;
|
||||
//turrets need to shoot once for 'visual reload' to be valid, otherwise they seem stuck at reload 0 when placed.
|
||||
public boolean visualReloadValid;
|
||||
public boolean logicShooting = false;
|
||||
public @Nullable Posc target;
|
||||
public Vec2 targetPos = new Vec2();
|
||||
@@ -503,7 +501,6 @@ public class Turret extends ReloadTurret{
|
||||
protected void updateShooting(){
|
||||
|
||||
if(reloadCounter >= reload && !charging() && shootWarmup >= minWarmup){
|
||||
visualReloadValid = true;
|
||||
BulletType type = peekAmmo();
|
||||
|
||||
shoot(type);
|
||||
|
||||
@@ -67,7 +67,7 @@ public class DrawTurret extends DrawBlock{
|
||||
Draw.z(Layer.turret);
|
||||
}
|
||||
|
||||
float progress = tb.visualReloadValid ? tb.progress() : 1f;
|
||||
float progress = tb.progress();
|
||||
|
||||
//TODO no smooth reload
|
||||
var params = DrawPart.params.set(build.warmup(), 1f - progress, 1f - progress, tb.heat, tb.curRecoil, tb.charge, tb.x + tb.recoilOffset.x, tb.y + tb.recoilOffset.y, tb.rotation);
|
||||
|
||||
Reference in New Issue
Block a user