]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/delay.qc
Some more cleanup to map objects, allow trigger_delay and trigger_counter to be deact...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / delay.qc
index 2cd4cfd1338ac0809f3f9ff451a65ee3f5a59f8d..7e593a56c0b7850934bf9c9fe4ad0fc12ef54ca5 100644 (file)
@@ -1,4 +1,5 @@
 #include "delay.qh"
+
 #ifdef SVQC
 void delay_delayeduse(entity this)
 {
@@ -8,6 +9,9 @@ void delay_delayeduse(entity this)
 
 void delay_use(entity this, entity actor, entity trigger)
 {
+       if(this.active != ACTIVE_ACTIVE)
+               return;
+
        this.enemy = actor;
        this.goalentity = trigger;
        setthink(this, delay_delayeduse);
@@ -19,6 +23,7 @@ void delay_reset(entity this)
        this.enemy = this.goalentity = NULL;
        setthink(this, func_null);
        this.nextthink = 0;
+       this.active = ACTIVE_ACTIVE;
 }
 
 spawnfunc(trigger_delay)
@@ -28,5 +33,6 @@ spawnfunc(trigger_delay)
 
     this.use = delay_use;
     this.reset = delay_reset;
+    this.active = ACTIVE_ACTIVE;
 }
 #endif