From: Mario Date: Mon, 23 Sep 2024 07:07:04 +0000 (+1000) Subject: Restore ability to pause counters instead of resetting to match relay behaviour X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FMario%2Frelay_support;p=xonotic%2Fxonotic-data.pk3dir.git Restore ability to pause counters instead of resetting to match relay behaviour --- 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