]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/counter.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 / counter.qc
index 44cbd9045307f844f473b15e0895c4a959aebfa2..765d3180e2619d118edeeeda0c521d5e6858a74c 100644 (file)
@@ -1,9 +1,11 @@
 #include "counter.qh"
-#ifdef SVQC
-void counter_reset(entity this);
 
+#ifdef SVQC
 void counter_use(entity this, entity actor, entity trigger)
 {
+       if(this.active != ACTIVE_ACTIVE)
+               return;
+
        entity store = this;
        if(this.spawnflags & COUNTER_PER_PLAYER)
        {
@@ -66,6 +68,7 @@ void counter_reset(entity this)
        setthink(this, func_null);
        this.nextthink = 0;
        this.counter_cnt = 0;
+       this.active = ACTIVE_ACTIVE;
 }
 
 /*QUAKED spawnfunc_trigger_counter (.5 .5 .5) ? nomessage COUNTER_FIRE_AT_COUNT
@@ -86,5 +89,6 @@ spawnfunc(trigger_counter)
        this.counter_cnt = 0;
        this.use = counter_use;
        this.reset = counter_reset;
+       this.active = ACTIVE_ACTIVE;
 }
 #endif