]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/secret.qc
Remove SELFPARAM() from .think and .touch
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / secret.qc
index 9be241e7f49e2c0b56b8ca50740334abb24b5ed2..a6f40be3ea5521a909f7d0df6c649e995e0da39c 100644 (file)
 
 void secrets_setstatus()
 {SELFPARAM();
-       self.stat_secrets_total = secrets_total;
-       self.stat_secrets_found = secrets_found;
+       this.stat_secrets_total = secrets_total;
+       this.stat_secrets_found = secrets_found;
 }
 
 /**
  * A secret has been found (maybe :P)
  */
-void trigger_secret_touch()
-{SELFPARAM();
+void trigger_secret_touch(entity this)
+{
        // only a player can trigger this
        if (!IS_PLAYER(other))
                return;
@@ -33,7 +33,7 @@ void trigger_secret_touch()
        self.message = "";
 
        // handle normal trigger features
-       multi_touch();
+       multi_touch(self);
        remove(self);
 }
 
@@ -58,30 +58,30 @@ spawnfunc(trigger_secret)
        secrets_total += 1;
 
        // add default message
-       if (self.message == "")
-               self.message = "You found a secret!";
+       if (this.message == "")
+               this.message = "You found a secret!";
 
        // set default sound
-       if (self.noise == "")
-       if (!self.sounds)
-               self.sounds = 1; // misc/secret.wav
+       if (this.noise == "")
+       if (!this.sounds)
+               this.sounds = 1; // misc/secret.wav
 
        // this entity can't be a target itself!!!!
-       self.targetname = "";
+       this.targetname = "";
 
        // you can't just shoot a room to find it, can you?
-       self.health = 0;
+       this.health = 0;
 
        // a secret can not be delayed
-       self.delay = 0;
+       this.delay = 0;
 
        // convert this trigger to trigger_once
-       self.classname = "trigger_once";
+       this.classname = "trigger_once";
        spawnfunc_trigger_once(this);
 
        // take over the touch() function, so we can mark secret as found
-       self.touch = trigger_secret_touch;
+       settouch(this, trigger_secret_touch);
        // ignore triggering;
-       self.use = func_null;
+       this.use = func_null;
 }
 #endif