]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Restore ability to pause counters instead of resetting to match relay behaviour Mario/relay_support 1318/head
authorMario <mario.mario@y7mail.com>
Mon, 23 Sep 2024 07:07:04 +0000 (17:07 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 23 Sep 2024 07:07:04 +0000 (17:07 +1000)
qcsrc/common/mapobjects/trigger/counter.qc

index aa734bda057a7f45c5d80e5a8d48fe257d6893f6..c33c34925b1a60789b47834e650d1cee22b7fb61 100644 (file)
@@ -63,22 +63,6 @@ void counter_use(entity this, entity actor, entity trigger)
                SUB_UseTargets(this, actor, trigger);
 }
 
-void counter_setactive(entity this, int act)
-{
-       int old_status = this.active;
-       if(act == ACTIVE_TOGGLE)
-               this.active = (this.active == ACTIVE_ACTIVE) ? ACTIVE_NOT : ACTIVE_ACTIVE;
-       else
-               this.active = act;
-
-       if(this.active != old_status && this.active == ACTIVE_ACTIVE)
-       {
-               // perform a complete reset upon reactivation
-               if(this.reset)
-                       this.reset(this);
-       }
-}
-
 void counter_reset(entity this)
 {
        setthink(this, func_null);
@@ -112,6 +96,5 @@ spawnfunc(trigger_counter)
        this.use = counter_use;
        this.reset = counter_reset;
        this.active = ACTIVE_ACTIVE;
-       this.setactive = counter_setactive;
 }
 #endif