]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/secret.qc
Cleanse the touch functions of the other evil
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / secret.qc
index a6f40be3ea5521a909f7d0df6c649e995e0da39c..b54f99dcd411eead96c2cfcc723767ba3b087850 100644 (file)
@@ -8,8 +8,8 @@
 
 #ifdef SVQC
 
-void secrets_setstatus()
-{SELFPARAM();
+void secrets_setstatus(entity this)
+{
        this.stat_secrets_total = secrets_total;
        this.stat_secrets_found = secrets_found;
 }
@@ -17,10 +17,10 @@ void secrets_setstatus()
 /**
  * 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, self.message);
-       self.message = "";
+       centerprint(toucher, this.message);
+       this.message = "";
 
        // handle normal trigger features
-       multi_touch(self);
-       remove(self);
+       multi_touch(this, toucher);
+       remove(this);
 }
 
 /*QUAKED trigger_secret (.5 .5 .5) ?