\r
void player_setupanimsformodel()\r
{\r
+ // if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
+ //if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+ // return;\r
+\r
local string animfilename;\r
local float animfile;\r
// defaults for legacy .zym models without animinfo files\r
self.anim_backright = '21 1 1';\r
self.anim_backleft = '22 1 1';\r
animparseerror = FALSE;\r
- animfilename = strcat(self.model, ".animinfo");\r
+ animfilename = strcat(self.playermodel, ".animinfo"); // only the normal player model may contain animation info\r
animfile = fopen(animfilename, FILE_READ);\r
if (animfile >= 0)\r
{\r
}\r
else\r
dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n");\r
+\r
+ // reset animstate now\r
+ setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
};\r
\r
void player_anim (void)\r
{\r
// if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
- if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
- return;\r
+ //if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+ // return;\r
\r
updateanim(self);\r
if (self.weaponentity)\r