From 45eddca5c4af9cee300fb71232bcd517b38ebf53 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 25 Jun 2016 10:38:42 +1000 Subject: [PATCH] Fix Arc cooldown sound playing on pickup after dying --- qcsrc/common/weapons/weapon/arc.qc | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- 2.39.2