From: Rudolf Polzer Date: Sun, 2 Dec 2012 11:38:20 +0000 (+0100) Subject: animdecide: cancel the weapon fire anim when firing is over X-Git-Tag: xonotic-v0.7.0~99^2~25^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ade42400c75d9f3e07a20dd046920cb92af20b0;p=xonotic%2Fxonotic-data.pk3dir.git animdecide: cancel the weapon fire anim when firing is over --- 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)