]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow customizing the sound secret door plays when touched
authorMario <mario@smbclan.net>
Mon, 26 Oct 2015 00:22:28 +0000 (10:22 +1000)
committerMario <mario@smbclan.net>
Mon, 26 Oct 2015 00:22:56 +0000 (10:22 +1000)
qcsrc/common/triggers/func/door_secret.qc

index 8686c671f7c097c3a5307ecca54e478ef2b3734b..ac7361951f0e6596790b07506d2d3a3304f2f10e 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,9 @@ spawnfunc(func_door_secret)
                return;
        self.effects |= EF_LOWPRECISION;
 
+       if(self.noise == "")
+               self.noise = "misc/talk.wav";
+
        self.touch = secret_touch;
        self.blocked = secret_blocked;
        self.speed = 50;