]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Invert z velocity so that the train aims properly
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 22 May 2012 12:31:35 +0000 (15:31 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 22 May 2012 12:31:35 +0000 (15:31 +0300)
qcsrc/server/g_subs.qc

index 8f19ee3c5400ea9a509c0dde02fe38e0cecade4b..049ba797ed24d450f2ec568ba78bcb410c30e3ce 100644 (file)
@@ -208,7 +208,13 @@ void SUB_CalcMove_controller_think (void)
                }
                self.owner.velocity = veloc;
                if(self.owner.bezier_turn)
-                       self.owner.angles = vectoangles(delta + 2 * delta2 * phasepos);
+               {
+                       vector vel;
+                       vel = delta + 2 * delta2 * phasepos;
+                       vel_z = -vel_z; // invert z velocity
+                       vel = vectoangles(vel);
+                       self.owner.angles = vel;
+               }
                self.nextthink = nexttick;
        } else {
                // derivative: delta + 2 * delta2 (e.g. for angle positioning)