]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_shotgun.qc
Merge remote branch 'origin/master' into fruitiex/animations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_shotgun.qc
index 46495fe646b2a1cdaccddc6f6e94353aaff970a5..bdd42ea379363c0ccba65784d71ac192e96f7f5b 100644 (file)
@@ -91,7 +91,7 @@ void shotgun_meleethink (void)
 
 void W_Shotgun_Attack2 (void)
 {
-       sound (self, CH_SHOTS_SINGLE, "weapons/shotgun_melee.wav", VOL_BASE, ATTN_NORM);
+       sound (self, CH_SHOTS, "weapons/shotgun_melee.wav", VOL_BASE, ATTN_NORM);
        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_shotgun_secondary_animtime, w_ready);
 
        entity meleetemp;
@@ -138,6 +138,7 @@ float w_shotgun(float req)
                        }
                }
                if (self.clip_load >= 0) // we are not currently reloading
+               if (!self.crouch) // we are not currently crouching; this fixes an exploit where your melee anim is not visible, and besides wouldn't make much sense
                if (self.BUTTON_ATCK2 && autocvar_g_balance_shotgun_secondary)
                if (weapon_prepareattack(1, autocvar_g_balance_shotgun_secondary_refire))
                {
@@ -191,11 +192,11 @@ float w_shotgun(float req)
                if(!w_issilent && time - self.prevric > 0.25)
                {
                        if(w_random < 0.0165)
-                               sound(self, CH_SHOTS_SINGLE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.033)
-                               sound(self, CH_SHOTS_SINGLE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.05)
-                               sound(self, CH_SHOTS_SINGLE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
                        self.prevric = time;
                }
        }