mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-03 22:21:17 +07:00
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:
parent
01d6aee754
commit
a04b385f56
@ -1675,6 +1675,7 @@ public class Blocks implements ContentList{
|
||||
recoilAmount = 3f;
|
||||
shootShake = 1f;
|
||||
burstSpacing = 3f;
|
||||
spread = 0f;
|
||||
shots = 4;
|
||||
ammoUseEffect = Fx.casing2;
|
||||
health = 240 * size * size;
|
||||
|
@ -426,13 +426,14 @@ public class Turret extends ReloadTurret{
|
||||
//when burst spacing is enabled, use the burst pattern
|
||||
}else if(burstSpacing > 0.0001f){
|
||||
for(int i = 0; i < shots; i++){
|
||||
int ii = i;
|
||||
Time.run(burstSpacing * i, () -> {
|
||||
if(!isValid() || !hasAmmo()) return;
|
||||
|
||||
recoil = recoilAmount;
|
||||
|
||||
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();
|
||||
useAmmo();
|
||||
recoil = recoilAmount;
|
||||
|
Loading…
Reference in New Issue
Block a user