]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/secret.qc
Merge branch 'master' into TimePath/unified_weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / secret.qc
index b93ab03d0a4ded5fcb90f76e2cef41c1963bb195..d16d2773c193442fe04b83943e47b7c9ad8a5652 100644 (file)
@@ -9,7 +9,8 @@
 
 #ifdef SVQC
 
-void secrets_setstatus() {
+void secrets_setstatus()
+{SELFPARAM();
        self.stat_secrets_total = secrets_total;
        self.stat_secrets_found = secrets_found;
 }
@@ -17,7 +18,8 @@ void secrets_setstatus() {
 /**
  * A secret has been found (maybe :P)
  */
-void trigger_secret_touch() {
+void trigger_secret_touch()
+{SELFPARAM();
        // only a player can trigger this
        if (!IS_PLAYER(other))
                return;
@@ -49,7 +51,8 @@ killtarget: remove all entities with this targetname when triggered
 You should create a common/trigger textured brush covering the entrance to a secret room/area.
 Trigger secret can only be trigger by a player's touch and can not be a target itself.
 */
-void spawnfunc_trigger_secret() {
+spawnfunc(trigger_secret)
+{
        // FIXME: should it be disabled in most modes?
 
        // update secrets count
@@ -75,7 +78,7 @@ void spawnfunc_trigger_secret() {
 
        // convert this trigger to trigger_once
        self.classname = "trigger_once";
-       spawnfunc_trigger_once();
+       spawnfunc_trigger_once(this);
 
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;