Fix spread + burst turrets (#6069)
* Fix spread + burst turrets * spread is 4 by default set salvo spread to 0 * damnit
This commit is contained in:
@@ -1675,6 +1675,7 @@ public class Blocks implements ContentList{
|
|||||||
recoilAmount = 3f;
|
recoilAmount = 3f;
|
||||||
shootShake = 1f;
|
shootShake = 1f;
|
||||||
burstSpacing = 3f;
|
burstSpacing = 3f;
|
||||||
|
spread = 0f;
|
||||||
shots = 4;
|
shots = 4;
|
||||||
ammoUseEffect = Fx.casing2;
|
ammoUseEffect = Fx.casing2;
|
||||||
health = 240 * size * size;
|
health = 240 * size * size;
|
||||||
|
|||||||
@@ -426,13 +426,14 @@ public class Turret extends ReloadTurret{
|
|||||||
//when burst spacing is enabled, use the burst pattern
|
//when burst spacing is enabled, use the burst pattern
|
||||||
}else if(burstSpacing > 0.0001f){
|
}else if(burstSpacing > 0.0001f){
|
||||||
for(int i = 0; i < shots; i++){
|
for(int i = 0; i < shots; i++){
|
||||||
|
int ii = i;
|
||||||
Time.run(burstSpacing * i, () -> {
|
Time.run(burstSpacing * i, () -> {
|
||||||
if(!isValid() || !hasAmmo()) return;
|
if(!isValid() || !hasAmmo()) return;
|
||||||
|
|
||||||
recoil = recoilAmount;
|
recoil = recoilAmount;
|
||||||
|
|
||||||
tr.trns(rotation, shootLength, Mathf.range(xRand));
|
tr.trns(rotation, shootLength, Mathf.range(xRand));
|
||||||
bullet(type, rotation + Mathf.range(inaccuracy));
|
bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy) + (ii - (int)(shots / 2f)) * spread);
|
||||||
effects();
|
effects();
|
||||||
useAmmo();
|
useAmmo();
|
||||||
recoil = recoilAmount;
|
recoil = recoilAmount;
|
||||||
|
|||||||
Reference in New Issue
Block a user