From: Mario Date: Sun, 30 Sep 2018 16:02:58 +0000 (+1000) Subject: Restore active state of buttons on reset X-Git-Tag: xonotic-v0.8.5~1807^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cde1b2352448e15b36dc28a35a4ed0cb49b3a7c3;p=xonotic%2Fxonotic-data.pk3dir.git Restore active state of buttons on reset --- 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;