From: Mario Date: Sat, 25 Jun 2016 00:38:42 +0000 (+1000) Subject: Fix Arc cooldown sound playing on pickup after dying X-Git-Tag: xonotic-v0.8.2~700^2~125 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=45eddca5c4af9cee300fb71232bcd517b38ebf53;p=xonotic%2Fxonotic-data.pk3dir.git Fix Arc cooldown sound playing on pickup after dying --- diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 083ed5146..012b2c0f1 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -857,6 +857,7 @@ METHOD(Arc, wr_drop, void(entity thiswep, entity actor)) weapon_dropevent_item.arc_cooldown = actor.arc_cooldown; actor.arc_overheat = 0; actor.arc_cooldown = 0; + actor.arc_BUTTON_ATCK_prev = false; } METHOD(Arc, wr_pickup, void(entity thiswep, entity actor)) { @@ -867,6 +868,18 @@ METHOD(Arc, wr_pickup, void(entity thiswep, entity actor)) actor.arc_cooldown = weapon_dropevent_item.arc_cooldown; } } +METHOD(Arc, wr_resetplayer, void(entity thiswep, entity actor)) +{ + actor.arc_overheat = 0; + actor.arc_cooldown = 0; + actor.arc_BUTTON_ATCK_prev = false; +} +METHOD(Arc, wr_playerdeath, void(entity thiswep, entity actor)) +{ + actor.arc_overheat = 0; + actor.arc_cooldown = 0; + actor.arc_BUTTON_ATCK_prev = false; +} #endif #ifdef CSQC bool autocvar_cl_arcbeam_teamcolor = true;