animfilename = strcat("models/weapons/h_", self.owner.weaponname, ".iqm.animinfo");\r
animfile = fopen(animfilename, FILE_READ);\r
// preset some defaults that work great for renamed zym files (which don't need an animinfo)\r
- self.anim_fire1 = '0 1 0.01';\r
- self.anim_fire2 = '1 1 0.01';\r
- self.anim_idle = '2 1 0.01';\r
- self.anim_reload = '3 1 0.01';\r
- if (animfile >= 0)\r
- {\r
- animparseerror = FALSE;\r
- self.anim_fire1 = animparseline(animfile);\r
- self.anim_fire2 = animparseline(animfile);\r
- self.anim_idle = animparseline(animfile);\r
- self.anim_reload = animparseline(animfile);\r
- fclose(animfile);\r
- if (animparseerror)\r
- print("Parse error in ", animfilename, ", some player animations are broken\n");\r
- }\r
+ self.anim_fire1 = animfixfps(self, '0 1 0.01');\r
+ self.anim_fire2 = animfixfps(self, '1 1 0.01');\r
+ self.anim_idle = animfixfps(self, '2 1 0.01');\r
+ self.anim_reload = animfixfps(self, '3 1 0.01');\r
\r
// if we have a "weapon" tag, let's attach the v_ model to it ("invisible hand" style model)\r
// if we don't, this is a "real" animated model\r
self.movedir = '0 0 0';\r
self.spawnorigin = '0 0 0';\r
self.oldorigin = '0 0 0';\r
- self.anim_fire1 = '0 1 0.01';\r
- self.anim_fire2 = '0 1 0.01';\r
- self.anim_idle = '0 1 0.01';\r
- self.anim_reload = '0 1 0.01';\r
+ self.anim_fire1 = animfixfps(self, '0 1 0.01');\r
+ self.anim_fire2 = animfixfps(self, '0 1 0.01');\r
+ self.anim_idle = animfixfps(self, '0 1 0.01');\r
+ self.anim_reload = animfixfps(self, '0 1 0.01');\r
}\r
\r
self.view_ofs = '0 0 0';\r
if (t)\r
if (!self.crouch) // shoot anim stands up, this looks bad\r
{\r
- local vector anim;\r
- anim = self.anim_shoot;\r
- anim_z = anim_y / (t + sys_frametime);\r
- setanim(self, anim, FALSE, TRUE, TRUE);\r
+ vector anim;\r
+ if(self.weapon == WEP_GRABBER && self.BUTTON_ATCK2)\r
+ {\r
+ // use melee attack animation for grabber alt fire\r
+ anim = self.anim_melee;\r
+ anim_z = anim_y / (t + sys_frametime);\r
+ setanim(self, anim, FALSE, TRUE, TRUE);\r
+ }\r
+ else\r
+ {\r
+ anim = self.anim_shoot;\r
+ anim_z = anim_y / (t + sys_frametime);\r
+ setanim(self, anim, FALSE, TRUE, TRUE);\r
+ }\r
}\r
};\r
\r
self.clip_load = 0;\r
self.old_clip_load = self.clip_load;\r
self.clip_load = self.(weapon_load[self.weapon]) = -1;\r
-}
\ No newline at end of file
+}\r