]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door_secret.qc
Precache it too
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door_secret.qc
index 8686c671f7c097c3a5307ecca54e478ef2b3734b..a0b70ecebee27fdfd2645552b2c2bce195e3befc 100644 (file)
@@ -161,7 +161,7 @@ void secret_touch()
        {
                if (IS_CLIENT(other))
                        centerprint(other, self.message);
-               play2(other, SND(TALK));
+               play2(other, self.noise);
        }
 }
 
@@ -210,6 +210,10 @@ spawnfunc(func_door_secret)
                return;
        self.effects |= EF_LOWPRECISION;
 
+       if(self.noise == "")
+               self.noise = "misc/talk.wav";
+       precache_sound(self.noise);
+
        self.touch = secret_touch;
        self.blocked = secret_blocked;
        self.speed = 50;