]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow trigger_relay to be disabled (time to get logical up in here)
authorMario <mario@smbclan.net>
Sat, 3 Feb 2018 12:37:42 +0000 (22:37 +1000)
committerMario <mario@smbclan.net>
Sat, 3 Feb 2018 12:37:42 +0000 (22:37 +1000)
qcsrc/common/triggers/trigger/relay.qc

index a82034edcf017d5abad297540444f5111f62110d..e5d0018032de0f67c63fc4ce91c5d5eaed56314a 100644 (file)
@@ -1,11 +1,21 @@
 #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
 }