]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Force arc to always play pitch shifted hitsounds for consistency
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 20 Dec 2014 10:46:01 +0000 (21:46 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 20 Dec 2014 10:46:01 +0000 (21:46 +1100)
qcsrc/client/View.qc

index bec4f9e3fd8be5e48ffb55b559b0ead0195d416e..0eacfb7f334ef0da239a915b8854deb7b3a56659 100644 (file)
@@ -449,7 +449,9 @@ void UpdateHitsound()
        // varying sound pitch
 
        static float hitsound_time_prev = 0;
-       if (COMPARE_INCREASING(time, hitsound_time_prev) > autocvar_cl_hitsound_antispam_time)
+       // HACK: the only way to get the arc to sound consistent with pitch shift is to ignore cl_hitsound_antispam_time
+       float arc_hack = activeweapon == WEP_ARC && autocvar_cl_hitsound >= 2;
+       if (arc_hack || COMPARE_INCREASING(time, hitsound_time_prev) > autocvar_cl_hitsound_antispam_time)
        {
                if (autocvar_cl_hitsound && unaccounted_damage)
                {