]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Oops, forgot to enable cubic movement after testing
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 13:03:47 +0000 (16:03 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 13:03:47 +0000 (16:03 +0300)
qcsrc/server/g_subs.qc

index 6ce77d5f5ae7984afe5b4ac940891feffcb1b0fd..5ac8f734826d6cf3f2929387bc3f7fefbe5e7aad 100644 (file)
@@ -188,11 +188,9 @@ void SUB_CalcMove_controller_think (void)
 
                traveltime = self.animstate_endtime - self.animstate_starttime;
                phasepos = (nexttick - self.animstate_starttime) / traveltime; // range: [0, 1]
+               phasepos = cubic_speedfunc(self.platmovetype_start, self.platmovetype_end, phasepos);
 
-               //phasepos = cubic_speedfunc(self.platmovetype_start, self.platmovetype_end, phasepos);
-
-/*
-               switch(self.platmovetype)
+               /* switch(self.platmovetype)
                {
                        case 1: // linear
                                break;
@@ -213,8 +211,7 @@ void SUB_CalcMove_controller_think (void)
                                // phasepos = sin(phasepos * (3.14159265 / 2));
                                phasepos = cubic_speedfunc(1.5, 0, phasepos);
                                break;
-               }
-*/
+               } */
                nextpos = self.origin + (delta * phasepos) + (delta2 * phasepos * phasepos);
                // derivative: delta + 2 * delta2 * phasepos (e.g. for angle positioning)