]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_shotgun.qc
Merge remote-tracking branch 'origin/master' into fruitiex/animations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_shotgun.qc
index 9d80ff4a7b88c2318c78e7468b4ce816d108e32f..a9d1ba056aca2f2691e731acccf9257161009425 100644 (file)
@@ -98,7 +98,7 @@ void W_Shotgun_Attack2 (void)
        meleetemp = spawn();
        meleetemp.owner = meleetemp.realowner = self;
        meleetemp.think = shotgun_meleethink;
-       meleetemp.nextthink = time + autocvar_g_balance_shotgun_secondary_melee_delay;
+       meleetemp.nextthink = time + autocvar_g_balance_shotgun_secondary_melee_delay * W_WeaponRateFactor();
        W_SetupShot_Range(self, TRUE, 0, "", 0, autocvar_g_balance_shotgun_secondary_damage, autocvar_g_balance_shotgun_secondary_melee_range);
 }
 
@@ -137,13 +137,14 @@ float w_shotgun(float req)
                                        if(weapon_prepareattack(0, autocvar_g_balance_shotgun_primary_animtime))
                                        {
                                                W_Shotgun_Attack();
-                                               self.shotgun_primarytime = time + autocvar_g_balance_shotgun_primary_refire;
+                                               self.shotgun_primarytime = time + autocvar_g_balance_shotgun_primary_refire * W_WeaponRateFactor();
                                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_shotgun_primary_animtime, w_ready);
                                        }
                                }
                        }
                }
                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))
                {