Merge remote branch 'refs/remotes/origin/fruitiex/outofammosound'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 05:42:06 +0000 (07:42 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 05:42:06 +0000 (07:42 +0200)
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/miscfunctions.qc
sound/weapons/dryfire.wav [new file with mode: 0644]

index 9e1eedae0339cac49b07111f5f2a04beee7ee49c..4537573c5d57b28c6ed7757a4aea131bcd78d109 100644 (file)
@@ -1117,6 +1117,9 @@ float weapon_prepareattack_checkammo(float secondary)
                for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
                        return FALSE;
 
+               if(self.weapon == self.switchweapon) // only play once BEFORE starting to switch weapons
+                       sound (self, CHAN_AUTO, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+
                W_SwitchToOtherWeapon(self);
                return FALSE;
        }
index d4232424072f84aa90d2c7fd220371e4a91aa923..59428f65dbca241c03f7b330440cdd8cf75fce98 100644 (file)
@@ -1668,6 +1668,7 @@ void precache()
     precache_sound ("weapons/weapon_switch.wav");
     precache_sound ("weapons/weaponpickup.wav");
     precache_sound ("weapons/unavailable.wav");
+    precache_sound ("weapons/dryfire.wav");
     if (g_grappling_hook)
     {
         precache_sound ("weapons/hook_fire.wav"); // hook
diff --git a/sound/weapons/dryfire.wav b/sound/weapons/dryfire.wav
new file mode 100644 (file)
index 0000000..81e86b1
Binary files /dev/null and b/sound/weapons/dryfire.wav differ