]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/keylock.qc
s/(void)/()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / keylock.qc
index f792185bc01eff4e608f176be13d8f4004be87b4..fe33e790655cc18b867e31219527f1cfcacea01c 100644 (file)
@@ -97,7 +97,7 @@ void trigger_keylock_touch()
 #ifdef SVQC
 bool trigger_keylock_send(entity to, int sf)
 {SELFPARAM();
-       WriteByte(MSG_ENTITY, ENT_CLIENT_KEYLOCK);
+       WriteHeader(MSG_ENTITY, ENT_CLIENT_KEYLOCK);
 
        WriteInt24_t(MSG_ENTITY, self.itemkeys);
        WriteByte(MSG_ENTITY, self.height);
@@ -132,8 +132,8 @@ wait: prevent triggering again for this amount of time (default: 5) - applies to
 If spawned without any key specified in itemkeys, this trigger will display an error and remove itself.
 message2 and noise2 will be resent to the player every 2 seconds while he is in the trigger zone.
 */
-void spawnfunc_trigger_keylock(void)
-{SELFPARAM();
+spawnfunc(trigger_keylock)
+{
        if(!self.itemkeys) { remove(self); return; }
 
        // set unlocked message
@@ -146,7 +146,7 @@ void spawnfunc_trigger_keylock(void)
                if(self.sounds == 1)
                        self.noise = "misc/secret.wav";
                else if(self.sounds == 2)
-                       self.noise = SND(TALK);
+                       self.noise = strzone(SND(TALK));
                else //if (self.sounds == 3) {
                        self.noise = "misc/trigger1.wav";
        }