self.weapon_think = func;
//dprint("next ", ftos(self.weapon_nextthink), "\n");
- // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting!
+ // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting!
+ //anim = self.anim_shoot;
if (restartanim)
if (t)
if (!self.crouch) // shoot anim stands up, this looks bad
{
- local vector anim;
+ 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);
+ }
}
};
void setanim(entity e, vector anim, float looping, float override, float restart)
{
+ if (!anim)
+ return; // no animation was given to us! We can't use this.
+
if (anim_x == e.animstate_startframe)
if (anim_y == e.animstate_numframes)
if (anim_z == e.animstate_framerate)