- vector anim;
- if(self.weapon == WEP_SHOTGUN && self.BUTTON_ATCK2)
- {
- anim = self.anim_melee;
- anim_z = anim_y / (t + sys_frametime);
- setanim(self, anim, FALSE, TRUE, TRUE);
- }
- else if (self.animstate_startframe == self.anim_idle_x) // 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);
- }
+ 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;