]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/secret.qc
Merge branch 'master' into Mario/killsound
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / secret.qc
index bf4178beae33396b3742a6bedabe5f950cc0d21d..e6e35c295a9f8d723285699de7db0972e850ea9c 100644 (file)
@@ -1,9 +1,9 @@
+#include "secret.qh"
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
     #include <common/util.qh>
     #include <server/defs.qh>
-    #include "secret.qh"
 #endif
 
 #ifdef SVQC
@@ -17,10 +17,10 @@ void secrets_setstatus(entity this)
 /**
  * A secret has been found (maybe :P)
  */
-void trigger_secret_touch(entity this)
+void trigger_secret_touch(entity this, entity toucher)
 {
        // only a player can trigger this
-       if (!IS_PLAYER(other))
+       if (!IS_PLAYER(toucher))
                return;
 
        // update secrets found counter
@@ -29,12 +29,12 @@ void trigger_secret_touch(entity this)
        //print(ftos(secret_counter.count), "\n");
 
        // centerprint message (multi_touch() doesn't always call centerprint())
-       centerprint(other, this.message);
+       centerprint(toucher, this.message);
        this.message = "";
 
        // handle normal trigger features
-       multi_touch(this);
-       remove(this);
+       multi_touch(this, toucher);
+       delete(this);
 }
 
 /*QUAKED trigger_secret (.5 .5 .5) ?