]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Flip orientation the same way on bezier movement, it is better
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 19:30:29 +0000 (22:30 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 19:30:29 +0000 (22:30 +0300)
qcsrc/server/g_subs.qc
qcsrc/server/t_plats.qc

index 0c1eff197d6e21134f0489f3920c8ee263bd26b5..004cf950c34354f1915352f46451cc84d8fa1cdc 100644 (file)
@@ -204,8 +204,8 @@ void SUB_CalcMove_controller_think (void)
                {
                        vector vel;
                        vel = delta + 2 * delta2 * phasepos;
-                       vel_z = -vel_z; // invert z velocity
                        vel = vectoangles(vel);
+                       vel_x = -vel_x; // flip up / down orientation
                        self.owner.angles = vel;
                }
                self.nextthink = nexttick;
index fb3cb22c6d3287ba24b465ccdfdd4917a1470cb0..f1f863196789fdb79899a6171991bdf8c7b667d5 100644 (file)
@@ -310,9 +310,10 @@ void train_wait()
                        cp = world;
 
                if(cp) // bezier curves movement
-                       org = vectoangles(cp.origin - (self.origin + self.mins)); // use the origin of the control point of the next path_corner
+                       org = cp.origin - (self.origin + self.mins); // use the origin of the control point of the next path_corner
                else // linear movement
-                       org = vectoangles(targ.origin - (self.origin + self.mins)); // use the origin of the next path_corner
+                       org = targ.origin - (self.origin + self.mins); // use the origin of the next path_corner
+               org = vectoangles(org);
                org_x = -org_x; // flip up / down orientation
 
                if(self.wait >= 0) // slow turning