From c1058ec35163c072502f6d7afe8ee3cd02825bd2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 29 Dec 2025 11:00:47 -0500 Subject: [PATCH] Fixed #11512 --- core/src/mindustry/type/Weapon.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 6f5083be8a..6ab803150a 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -426,6 +426,8 @@ public class Weapon implements Cloneable{ Vars.control.sound.loop(activeSound, unit, activeSoundVolume); } + float velLen = unit.isRemote() ? unit.vel.len() : unit.deltaLen() / Time.delta; + //shoot if applicable if(mount.shoot && //must be shooting can && //must be able to shoot @@ -433,7 +435,7 @@ public class Weapon implements Cloneable{ (!useAmmo || unit.ammo > 0 || !state.rules.unitAmmo || unit.team.rules().infiniteAmmo) && //check ammo (!alternate || wasFlipped == flipSprite) && mount.warmup >= minWarmup && //must be warmed up - unit.deltaLen() / Time.delta >= minShootVelocity && //check velocity requirements + velLen >= minShootVelocity && //check velocity requirements (mount.reload <= 0.0001f || (alwaysContinuous && mount.bullet == null)) && //reload has to be 0, or it has to be an always-continuous weapon (alwaysShooting || Angles.within(rotate ? mount.rotation : unit.rotation + baseRotation, mount.targetRotation, shootCone)) //has to be within the cone ){