Do not precache strength_respawn.wav and shield_respawn.wav in minstagib, in this...
authorterencehill <piuntn@gmail.com>
Sat, 10 Jul 2010 12:23:11 +0000 (14:23 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 10 Jul 2010 12:23:11 +0000 (14:23 +0200)
qcsrc/server/t_items.qc

index caa7c2119272e1d766bea2f471e7e2b150761d89..537b5ef49388bc1b315d5fc8aa1fef2f1bb877b4 100644 (file)
@@ -828,13 +828,14 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
 
                precache_model (itemmodel);
                precache_sound (pickupsound);
-               precache_sound ("misc/itemrespawn.wav");
-               precache_sound ("misc/itemrespawncountdown.wav");
 
-               if(itemid == IT_STRENGTH)
+               precache_sound ("misc/itemrespawncountdown.wav");
+               if(!g_minstagib && itemid == IT_STRENGTH)
                        precache_sound ("misc/strength_respawn.wav");
-               if(itemid == IT_INVINCIBLE)
+               else if(!g_minstagib && itemid == IT_INVINCIBLE)
                        precache_sound ("misc/shield_respawn.wav");
+               else
+                       precache_sound ("misc/itemrespawn.wav");
 
                if((itemid & (IT_STRENGTH | IT_INVINCIBLE | IT_HEALTH | IT_ARMOR | IT_KEY1 | IT_KEY2)) || (weaponid & WEPBIT_ALL))
                        self.target = "###item###"; // for finding the nearest item using find()