]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_weaponsystem.qc
Merge branch 'master' into Mario/mutator_minstagib
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_weaponsystem.qc
index 402b692af1230fba959a89c1fce3aef5a999ab13..07b9149cea10424892854674ede3c70ef6a1c003 100644 (file)
@@ -132,8 +132,10 @@ vector w_shotend;
 .float prevstrengthsoundattempt;
 void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound
 {
-               if((!g_minstagib)
-                       && (player.items & IT_STRENGTH)
+       if(MUTATOR_CALLHOOK(PlayStrengthSound))
+               return;
+               
+               if((player.items & IT_STRENGTH)
                        && ((time > player.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam
                        || (time > player.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)))
                {
@@ -1008,13 +1010,14 @@ void weapon_thinkf(float fr, float t, void() func)
        if (self.weaponentity)
        {
                self.weaponentity.wframe = fr;
+               a = '0 0 0';
                if (fr == WFRAME_IDLE)
                        a = self.weaponentity.anim_idle;
                else if (fr == WFRAME_FIRE1)
                        a = self.weaponentity.anim_fire1;
                else if (fr == WFRAME_FIRE2)
                        a = self.weaponentity.anim_fire2;
-               else if (fr == WFRAME_RELOAD)
+               else // if (fr == WFRAME_RELOAD)
                        a = self.weaponentity.anim_reload;
                a_z *= g_weaponratefactor;
                setanim(self.weaponentity, a, restartanim == FALSE, restartanim, restartanim);
@@ -1196,7 +1199,7 @@ vector findperpendicular(vector v)
 vector W_CalculateProjectileSpread(vector forward, float spread)
 {
        float sigma;
-       vector v1, v2;
+       vector v1 = '0 0 0', v2;
        float dx, dy, r;
        float sstyle;
        spread *= g_weaponspreadfactor;