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 2cd4cfd..7e593a5 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