self.anim_forwardleft = '20 1 1';
self.anim_backright = '21 1 1';
self.anim_backleft = '22 1 1';
+ self.anim_melee = '23 1 1';
animparseerror = FALSE;
animfilename = strcat(self.model, ".animinfo");
animfile = fopen(animfilename, FILE_READ);
self.anim_forwardleft = animparseline(animfile);
self.anim_backright = animparseline(animfile);
self.anim_backleft = animparseline(animfile);
+ self.anim_melee = animparseline(animfile);
fclose(animfile);
// derived anims
if (!self.crouch) // shoot anim stands up, this looks bad
{
local vector anim;
- anim = self.anim_shoot;
+ 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);
}
self.clip_load = 0;
self.old_clip_load = self.clip_load;
self.clip_load = self.weapon_load[self.weapon] = -1;
-}
\ No newline at end of file
+}
.vector anim_forwardleft; // player running forward and left
.vector anim_backright; // player running backward and right
.vector anim_backleft; // player running back and left
+.vector anim_melee; // player doing the melee action
// weapon animation vectors:
.vector anim_fire1;