From b6b447e34ab6d17f2d6c283fc5adf0b2d5984bf2 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Thu, 26 May 2011 02:59:04 +0300 Subject: [PATCH] allow the shoot anim to override only the idle animation --- qcsrc/server/cl_weaponsystem.qc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 8589a8806..f3040117a 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1257,18 +1257,23 @@ 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! if (restartanim) if (t) if (!self.crouch) // shoot anim stands up, this looks bad { local vector anim; if(self.weapon == WEP_SHOTGUN && self.BUTTON_ATCK2) + { anim = self.anim_melee; - /*else - anim = self.anim_shoot;*/ - anim_z = anim_y / (t + sys_frametime); - setanim(self, anim, FALSE, TRUE, TRUE); + anim_z = anim_y / (t + sys_frametime); + setanim(self, anim, FALSE, TRUE, TRUE); + } + else if (self.animstate_startframe == 7) // only allow shoot anim to override idle animation until we have animation blending + { + anim = self.anim_shoot; + anim_z = anim_y / (t + sys_frametime); + setanim(self, anim, FALSE, TRUE, TRUE); + } } }; -- 2.39.2