]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Always precache trigger_multiple sound (reduces spam on some maps)
authorMario <mario@smbclan.net>
Sun, 13 Mar 2016 21:44:03 +0000 (07:44 +1000)
committerMario <mario@smbclan.net>
Sun, 13 Mar 2016 21:44:03 +0000 (07:44 +1000)
qcsrc/common/triggers/trigger/multi.qc

index 500f8f32f8f5f251d13bbedccd0f16c45d23ca84..b9d3aeb96e9081a7eab274bfb5cc535896c55088 100644 (file)
@@ -147,19 +147,14 @@ spawnfunc(trigger_multiple)
 {
        self.reset = multi_reset;
        if (self.sounds == 1)
-       {
-               precache_sound ("misc/secret.wav");
                self.noise = "misc/secret.wav";
-       }
        else if (self.sounds == 2)
-       {
                self.noise = strzone(SND(TALK));
-       }
        else if (self.sounds == 3)
-       {
-               precache_sound ("misc/trigger1.wav");
                self.noise = "misc/trigger1.wav";
-       }
+
+       if(self.noise)
+               precache_sound(self.noise);
 
        if (!self.wait)
                self.wait = 0.2;