Turret payload shoot fix
This commit is contained in:
@@ -395,7 +395,7 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
for(int i = 0; i < chargeEffects; i++){
|
for(int i = 0; i < chargeEffects; i++){
|
||||||
Time.run(Mathf.random(chargeMaxDelay), () -> {
|
Time.run(Mathf.random(chargeMaxDelay), () -> {
|
||||||
if(!isValid()) return;
|
if(dead) return;
|
||||||
tr.trns(rotation, shootLength);
|
tr.trns(rotation, shootLength);
|
||||||
chargeEffect.at(x + tr.x, y + tr.y, rotation);
|
chargeEffect.at(x + tr.x, y + tr.y, rotation);
|
||||||
});
|
});
|
||||||
@@ -404,7 +404,7 @@ public class Turret extends ReloadTurret{
|
|||||||
charging = true;
|
charging = true;
|
||||||
|
|
||||||
Time.run(chargeTime, () -> {
|
Time.run(chargeTime, () -> {
|
||||||
if(!isValid()) return;
|
if(dead) return;
|
||||||
tr.trns(rotation, shootLength);
|
tr.trns(rotation, shootLength);
|
||||||
recoil = recoilAmount;
|
recoil = recoilAmount;
|
||||||
heat = 1f;
|
heat = 1f;
|
||||||
@@ -418,7 +418,7 @@ public class Turret extends ReloadTurret{
|
|||||||
for(int i = 0; i < shots; i++){
|
for(int i = 0; i < shots; i++){
|
||||||
int ii = i;
|
int ii = i;
|
||||||
Time.run(burstSpacing * i, () -> {
|
Time.run(burstSpacing * i, () -> {
|
||||||
if(!isValid() || !hasAmmo()) return;
|
if(dead || !hasAmmo()) return;
|
||||||
|
|
||||||
recoil = recoilAmount;
|
recoil = recoilAmount;
|
||||||
|
|
||||||
@@ -478,7 +478,7 @@ public class Turret extends ReloadTurret{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void ejectEffects(){
|
protected void ejectEffects(){
|
||||||
if(!isValid()) return;
|
if(dead) return;
|
||||||
|
|
||||||
//alternate sides when using a double turret
|
//alternate sides when using a double turret
|
||||||
float scl = (shots == 2 && alternate && shotCounter % 2 == 1 ? -1f : 1f);
|
float scl = (shots == 2 && alternate && shotCounter % 2 == 1 ? -1f : 1f);
|
||||||
|
|||||||
Reference in New Issue
Block a user