//print(ftos(time), " -> ", ftos(e.frame), "\n");\r
};\r
\r
-float animparseerror;\r
-vector animparseline(float animfile)\r
-{\r
- local string line;\r
- local float c;\r
- local vector anim;\r
- if (animfile < 0)\r
- return '0 1 2';\r
- line = fgets(animfile);\r
- c = tokenize_console(line);\r
- if (c < 3)\r
+vector animfixfps(entity e, vector a)\r
+{\r
+ // multi-frame anim: keep as-is\r
+ if(a_y == 1)\r
{\r
- animparseerror = TRUE;\r
- return '0 1 2';\r
+ float dur;\r
+ dur = frameduration(e.modelindex, a_x);\r
+ if(dur > 0)\r
+ a_z = 1.0 / dur;\r
}\r
- anim_x = stof(argv(0));\r
- anim_y = stof(argv(1));\r
- anim_z = stof(argv(2));\r
- // don't allow completely bogus values\r
- if (anim_x < 0 || anim_y < 1 || anim_z < 0.001)\r
- anim = '0 1 2';\r
- return anim;\r
-};\r
+ return a;\r
+}\r
\r
/*\r
==================\r