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