From 4ade42400c75d9f3e07a20dd046920cb92af20b0 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 2 Dec 2012 12:38:20 +0100 Subject: [PATCH] animdecide: cancel the weapon fire anim when firing is over --- qcsrc/server/cl_weaponsystem.qc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index e2e547a23..690d9b551 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1046,16 +1046,18 @@ void weapon_thinkf(float fr, float t, void() func) self.weapon_think = func; //dprint("next ", ftos(self.weapon_nextthink), "\n"); - // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting! - //anim = self.anim_shoot; - if (t) - if (!self.crouch) // shoot anim stands up, this looks bad + if((fr == WFRAME_FIRE1 || fr == WFRAME_FIRE2) && t) { if(self.weapon == WEP_SHOTGUN && self.BUTTON_ATCK2) animdecide_setaction(self, ANIMACTION_MELEE, restartanim); else animdecide_setaction(self, ANIMACTION_SHOOT, restartanim); } + else + { + if(self.anim_upper_action == ANIMACTION_SHOOT || self.anim_upper_action == ANIMACTION_MELEE) + self.anim_upper_action = 0; + } } void weapon_boblayer1(float spd, vector org) -- 2.39.2