X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fkeylock.qc;h=fe33e790655cc18b867e31219527f1cfcacea01c;hb=d4e9ae30b350c9f471dcb72929e976735c818919;hp=17313f0aa85de43dda806660633a4055dcf10a73;hpb=802d673ea15260b02ce6760839cc40a2a57b21b1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index 17313f0aa..fe33e7906 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -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 = "misc/talk.wav"; + self.noise = strzone(SND(TALK)); else //if (self.sounds == 3) { self.noise = "misc/trigger1.wav"; } @@ -157,7 +157,7 @@ void spawnfunc_trigger_keylock(void) // set closed sourd if(self.noise2 == "") - self.noise2 = "misc/talk.wav"; + self.noise2 = SND(TALK); // delay between triggering message2 and trigger2 if(!self.wait) { self.wait = 5; }