X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_weaponsystem.qc;h=a75e2be5af16fee8e3758a60e0590a28f020ad0f;hb=db5c4d5b616a207cc01a6c0a81c574a572ce0426;hp=e2e547a2354b0301ac24f83ae11c281d2a033534;hpb=5d57b7221cb0a7e1e3b4d4eb78977ac1d2abb108;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index e2e547a23..a75e2be5a 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1008,13 +1008,14 @@ void weapon_thinkf(float fr, float t, void() func) if (self.weaponentity) { self.weaponentity.wframe = fr; + a = '0 0 0'; if (fr == WFRAME_IDLE) a = self.weaponentity.anim_idle; else if (fr == WFRAME_FIRE1) a = self.weaponentity.anim_fire1; else if (fr == WFRAME_FIRE2) a = self.weaponentity.anim_fire2; - else if (fr == WFRAME_RELOAD) + else // if (fr == WFRAME_RELOAD) a = self.weaponentity.anim_reload; a_z *= g_weaponratefactor; setanim(self.weaponentity, a, restartanim == FALSE, restartanim, restartanim); @@ -1046,16 +1047,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) + if(self.weapon == WEP_SHOTGUN && fr == WFRAME_FIRE2) 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) @@ -1186,7 +1189,7 @@ vector findperpendicular(vector v) vector W_CalculateProjectileSpread(vector forward, float spread) { float sigma; - vector v1, v2; + vector v1 = '0 0 0', v2; float dx, dy, r; float sstyle; spread *= g_weaponspreadfactor;