Fixed #11512
This commit is contained in:
@@ -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
|
||||
){
|
||||
|
||||
Reference in New Issue
Block a user