From: FruitieX Date: Wed, 25 May 2011 23:59:04 +0000 (+0300) Subject: allow the shoot anim to override only the idle animation X-Git-Tag: xonotic-v0.6.0~40^2~76^2~23 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b6b447e34ab6d17f2d6c283fc5adf0b2d5984bf2;p=xonotic%2Fxonotic-data.pk3dir.git allow the shoot anim to override only the idle animation --- 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); + } } };