From cf476b041e9004fb47e5fabac15ea751e5559d79 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 3 Feb 2018 22:37:42 +1000 Subject: [PATCH] Allow trigger_relay to be disabled (time to get logical up in here) --- qcsrc/common/triggers/trigger/relay.qc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/triggers/trigger/relay.qc b/qcsrc/common/triggers/trigger/relay.qc index a82034edc..e5d001803 100644 --- a/qcsrc/common/triggers/trigger/relay.qc +++ b/qcsrc/common/triggers/trigger/relay.qc @@ -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 } -- 2.39.2