From cde1b2352448e15b36dc28a35a4ed0cb49b3a7c3 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 1 Oct 2018 02:02:58 +1000 Subject: [PATCH] Restore active state of buttons on reset --- qcsrc/common/mapobjects/func/button.qc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/mapobjects/func/button.qc b/qcsrc/common/mapobjects/func/button.qc index ab30aef2c..024d5cfd8 100644 --- a/qcsrc/common/mapobjects/func/button.qc +++ b/qcsrc/common/mapobjects/func/button.qc @@ -105,6 +105,9 @@ void button_reset(entity this) this.frame = 0; // use normal textures this.state = STATE_BOTTOM; this.velocity = '0 0 0'; + this.wait_remaining = -1; + this.activation_time = -1; + this.active = ACTIVE_ACTIVE; setthink(this, func_null); this.nextthink = 0; if (GetResourceAmount(this, RESOURCE_HEALTH)) @@ -203,13 +206,9 @@ spawnfunc(func_button) if (!this.lip) this.lip = 4; - this.wait_remaining = -1; - this.activation_time = -1; - if(this.noise != "") precache_sound(this.noise); - this.active = ACTIVE_ACTIVE; this.draggable = drag_undraggable; this.setactive = button_setactive; -- 2.39.2