]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/relay_if.qc
Bot AI: reduce powerup rating value
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay_if.qc
index cadd95e5840abd319b53af727505d19a05cc9cc4..9adcd666ecc7ab3e73a8416ddfd118c869adce91 100644 (file)
@@ -1,20 +1,20 @@
+#include "relay_if.qh"
 #ifdef SVQC
-void trigger_relay_if_use()
-{SELFPARAM();
-       float n;
-       n = self.count;
+void trigger_relay_if_use(entity this, entity actor, entity trigger)
+{
+       int n = this.count;
 
        // TODO make this generic AND faster than nextent()ing through all, if somehow possible
-       n = (cvar_string(self.netname) == cvar_string(self.message));
-       if(self.spawnflags & 1)
+       n = (cvar_string(this.netname) == cvar_string(this.message));
+       if(this.spawnflags & RELAYIF_NEGATE)
                n = !n;
 
        if(n)
-               SUB_UseTargets();
+               SUB_UseTargets(this, actor, trigger);
 }
 
-void spawnfunc_trigger_relay_if()
-{SELFPARAM();
-       self.use = trigger_relay_if_use;
+spawnfunc(trigger_relay_if)
+{
+       this.use = trigger_relay_if_use;
 }
 #endif