X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsecret.qc;h=06f7e075ddcc241a0323b6d5a7a31efbf5f8d5ec;hb=466ca3100f637b4faa58bd7f80ff0a2fe738ad1f;hp=9af13eca28df58d6860bce3edda0c856efd20f66;hpb=30e9db455abe691a3560555a989beb382b3b2531;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/secret.qc b/qcsrc/server/secret.qc index 9af13eca2..06f7e075d 100644 --- a/qcsrc/server/secret.qc +++ b/qcsrc/server/secret.qc @@ -10,9 +10,9 @@ void secrets_setstatus() { */ void trigger_secret_touch() { // only a player can trigger this - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; - + // update secrets found counter secrets_found += 1; //print("Secret found: ", ftos(secret_counter.cnt), "/"); @@ -21,7 +21,7 @@ void trigger_secret_touch() { // centerprint message (multi_touch() doesn't always call centerprint()) centerprint(other, self.message); self.message = ""; - + // handle normal trigger features multi_touch(); remove(self); @@ -42,32 +42,32 @@ Trigger secret can only be trigger by a player's touch and can not be a target i */ void spawnfunc_trigger_secret() { // FIXME: should it be disabled in most modes? - + // update secrets count secrets_total += 1; - + // add default message if (self.message == "") self.message = "You found a secret!"; - + // set default sound if (self.noise == "") - if not(self.sounds) + if (!self.sounds) self.sounds = 1; // misc/secret.wav - + // this entity can't be a target itself!!!! self.targetname = ""; - + // you can't just shoot a room to find it, can you? self.health = 0; - + // a secret can not be delayed self.delay = 0; - + // convert this trigger to trigger_once self.classname = "trigger_once"; spawnfunc_trigger_once(); - + // take over the touch() function, so we can mark secret as found self.touch = trigger_secret_touch; // ignore triggering;