]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/secret.qc
Merge remote-tracking branch 'origin/master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / secret.qc
index ca4a49cf4035b760c9da07aadca904fe2c602696..9af13eca28df58d6860bce3edda0c856efd20f66 100644 (file)
@@ -10,13 +10,17 @@ void secrets_setstatus() {
  */
 void trigger_secret_touch() {
        // only a player can trigger this
-       if (other.classname != "player")
+       if not(IS_PLAYER(other))
                return;
        
        // update secrets found counter
        secrets_found += 1;
        //print("Secret found: ", ftos(secret_counter.cnt), "/");
        //print(ftos(secret_counter.count), "\n");
+
+       // centerprint message (multi_touch() doesn't always call centerprint())
+       centerprint(other, self.message);
+       self.message = "";
        
        // handle normal trigger features
        multi_touch();
@@ -67,6 +71,6 @@ void spawnfunc_trigger_secret() {
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;
-       self.use = SUB_Null;
+       self.use = func_null;
 }