]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/secret.qc
Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / secret.qc
index 9af13eca28df58d6860bce3edda0c856efd20f66..30fbedc4948a27187949b09a43348ed7fe5c9040 100644 (file)
@@ -1,4 +1,11 @@
-
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+       #include "../dpdefs/progsdefs.qh"
+    #include "../common/util.qh"
+    #include "defs.qh"
+    #include "secret.qh"
+#endif
 
 void secrets_setstatus() {
        self.stat_secrets_total = secrets_total;
@@ -10,9 +17,9 @@ void secrets_setstatus() {
  */
 void trigger_secret_touch() {
        // only a player can trigger this
-       if not(IS_PLAYER(other))
+       if (!IS_PLAYER(other))
                return;
-       
+
        // update secrets found counter
        secrets_found += 1;
        //print("Secret found: ", ftos(secret_counter.cnt), "/");
@@ -21,7 +28,7 @@ void trigger_secret_touch() {
        // centerprint message (multi_touch() doesn't always call centerprint())
        centerprint(other, self.message);
        self.message = "";
-       
+
        // handle normal trigger features
        multi_touch();
        remove(self);
@@ -42,32 +49,32 @@ Trigger secret can only be trigger by a player's touch and can not be a target i
 */
 void spawnfunc_trigger_secret() {
        // FIXME: should it be disabled in most modes?
-       
+
        // update secrets count
        secrets_total += 1;
-       
+
        // add default message
        if (self.message == "")
                self.message = "You found a secret!";
-       
+
        // set default sound
        if (self.noise == "")
-       if not(self.sounds)
+       if (!self.sounds)
                self.sounds = 1; // misc/secret.wav
-       
+
        // this entity can't be a target itself!!!!
        self.targetname = "";
-       
+
        // you can't just shoot a room to find it, can you?
        self.health = 0;
-       
+
        // a secret can not be delayed
        self.delay = 0;
-       
+
        // convert this trigger to trigger_once
        self.classname = "trigger_once";
        spawnfunc_trigger_once();
-       
+
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;