]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/relay.qc
Move an assault constant into the assault file
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay.qc
index a82034edcf017d5abad297540444f5111f62110d..f99d364aec5bdb560d9c1f51f5d92b3f8e77d714 100644 (file)
@@ -1,13 +1,26 @@
 #include "relay.qh"
 #ifdef SVQC
+
+void relay_use(entity this, entity actor, entity trigger)
+{
+       if(this.active != ACTIVE_ACTIVE)
+               return;
+
+       SUB_UseTargets(this, actor, trigger);
+}
+
 /*QUAKED spawnfunc_trigger_relay (.5 .5 .5) (-8 -8 -8) (8 8 8)
 This fixed size trigger cannot be touched, it can only be fired by other events.  It can contain killtargets, targets, delays, and messages.
 */
 spawnfunc(trigger_relay)
 {
-       this.use = SUB_UseTargets;
+       this.active = ACTIVE_ACTIVE;
+       this.use = relay_use;
        this.reset = spawnfunc_trigger_relay; // this spawnfunc resets fully
 }
 
-spawnfunc(target_relay) { spawnfunc_trigger_relay(this); }
+spawnfunc(target_relay)
+{
+       spawnfunc_trigger_relay(this);
+}
 #endif