#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);
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
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";
}