]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_subs.qc
Use Erebus animations for the nex fox models, which are a lot prettier. Also fix...
[voretournament/voretournament.git] / data / qcsrc / server / g_subs.qc
index 49aaebf6f7be52242bd84810085dc115d1baf095..496f532eb99a19423744c833e4bec91b11439531 100644 (file)
@@ -54,29 +54,18 @@ void updateanim(entity e)
        //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