From 057ae077d659b2cb82ac58b149ad42c69f9ca7cf Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Sep 2024 17:07:04 +1000 Subject: [PATCH] Restore ability to pause counters instead of resetting to match relay behaviour --- qcsrc/common/mapobjects/trigger/counter.qc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/qcsrc/common/mapobjects/trigger/counter.qc b/qcsrc/common/mapobjects/trigger/counter.qc index aa734bda0..c33c34925 100644 --- a/qcsrc/common/mapobjects/trigger/counter.qc +++ b/qcsrc/common/mapobjects/trigger/counter.qc @@ -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 -- 2.39.2