]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/relay_if.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / relay_if.qc
index 9adcd666ecc7ab3e73a8416ddfd118c869adce91..a8855f5508eb95cddc0f542dfcb76e42d4dac45c 100644 (file)
@@ -1,7 +1,11 @@
 #include "relay_if.qh"
+
 #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 +19,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