X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Frelay_if.qc;h=7586bd338428ef644cef1f060ff3db537b630ac2;hb=d611f37d63254ae205c5e125e90f93e86de3e524;hp=9adcd666ecc7ab3e73a8416ddfd118c869adce91;hpb=a2c814deeb0ca978455f96c11992c75a4d87d707;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/relay_if.qc b/qcsrc/common/mapobjects/trigger/relay_if.qc index 9adcd666e..7586bd338 100644 --- a/qcsrc/common/mapobjects/trigger/relay_if.qc +++ b/qcsrc/common/mapobjects/trigger/relay_if.qc @@ -2,6 +2,9 @@ #ifdef SVQC void trigger_relay_if_use(entity this, entity actor, entity trigger) { + if(this.active != ACTIVE_ACTIVE) + return; + int n = this.count; // TODO make this generic AND faster than nextent()ing through all, if somehow possible @@ -15,6 +18,8 @@ void trigger_relay_if_use(entity this, entity actor, entity trigger) spawnfunc(trigger_relay_if) { + this.reset = spawnfunc_trigger_relay_if; // this spawnfunc resets fully + this.active = ACTIVE_ACTIVE; this.use = trigger_relay_if_use; } #endif