]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_subs.qc
Merge branch 'master' into TimePath/csqc_viewmodels
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_subs.qc
index f2e3da898645ddfb755f0bd852e7a077988efa94..f7dcf3073a114b4dbf7078bc9e71cd7f0853c925 100644 (file)
@@ -11,50 +11,6 @@ spawnfunc(info_null)
        // if anything breaks, tell the mapper to fix his map! info_null is meant to remove itself immediately.
 }
 
-void setanim(entity e, vector anim, float looping, float override, float restart)
-{
-       if (!anim)
-               return; // no animation was given to us! We can't use this.
-
-       if (anim.x == e.animstate_startframe)
-       if (anim.y == e.animstate_numframes)
-       if (anim.z == e.animstate_framerate)
-       {
-               if(restart)
-               {
-                       if(restart > 0)
-                       if(anim.y == 1) // ZYM animation
-                               BITXOR_ASSIGN(e.effects, EF_RESTARTANIM_BIT);
-               }
-               else
-                       return;
-       }
-       e.animstate_startframe = anim.x;
-       e.animstate_numframes = anim.y;
-       e.animstate_framerate = anim.z;
-       e.animstate_starttime = servertime - 0.1 * serverframetime; // shift it a little bit into the past to prevent float inaccuracy hiccups
-       e.animstate_endtime = e.animstate_starttime + e.animstate_numframes / e.animstate_framerate;
-       e.animstate_looping = looping;
-       e.animstate_override = override;
-       e.frame = e.animstate_startframe;
-       e.frame1time = servertime;
-}
-
-void updateanim(entity e)
-{
-       if (time >= e.animstate_endtime)
-       {
-               if (e.animstate_looping)
-               {
-                       e.animstate_starttime = e.animstate_endtime;
-                       e.animstate_endtime = e.animstate_starttime + e.animstate_numframes / e.animstate_framerate;
-               }
-               e.animstate_override = false;
-       }
-       e.frame = e.animstate_startframe + bound(0, (time - e.animstate_starttime) * e.animstate_framerate, e.animstate_numframes - 1);
-       //print(ftos(time), " -> ", ftos(e.frame), "\n");
-}
-
 /*
 ==================
 main