]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Name angle floats more correctly
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 19:32:11 +0000 (22:32 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 19:32:11 +0000 (22:32 +0300)
qcsrc/server/g_subs.qc
qcsrc/server/t_plats.qc

index 004cf950c34354f1915352f46451cc84d8fa1cdc..82f2695a83e2c58b1cbab9a8f0333689374cc58b 100644 (file)
@@ -202,11 +202,11 @@ void SUB_CalcMove_controller_think (void)
                self.owner.velocity = veloc;
                if(self.owner.platmovetype_turn)
                {
-                       vector vel;
-                       vel = delta + 2 * delta2 * phasepos;
-                       vel = vectoangles(vel);
-                       vel_x = -vel_x; // flip up / down orientation
-                       self.owner.angles = vel;
+                       vector ang;
+                       ang = delta + 2 * delta2 * phasepos;
+                       ang = vectoangles(ang);
+                       ang_x = -ang_x; // flip up / down orientation
+                       self.owner.angles = ang;
                }
                self.nextthink = nexttick;
        } else {
index f1f863196789fdb79899a6171991bdf8c7b667d5..4b0adbfa166750af34d43ac1f7cc78d70bcd7813 100644 (file)
@@ -302,7 +302,7 @@ void train_wait()
        if(self.platmovetype_turn && !self.train_wait_turning)
        {
                entity targ, cp;
-               vector org;
+               vector ang;
                targ = find(world, targetname, self.target);
                if((self.spawnflags & 1) && targ.curvetarget)
                        cp = find(world, targetname, targ.curvetarget);
@@ -310,20 +310,20 @@ void train_wait()
                        cp = world;
 
                if(cp) // bezier curves movement
-                       org = cp.origin - (self.origin + self.mins); // use the origin of the control point of the next path_corner
+                       ang = cp.origin - (self.origin + self.mins); // use the origin of the control point of the next path_corner
                else // linear movement
-                       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
+                       ang = targ.origin - (self.origin + self.mins); // use the origin of the next path_corner
+               ang = vectoangles(ang);
+               ang_x = -ang_x; // flip up / down orientation
 
                if(self.wait >= 0) // slow turning
                {
-                       SUB_CalcAngleMove(org, TSPEED_TIME, self.ltime - time + self.wait, train_wait);
+                       SUB_CalcAngleMove(ang, TSPEED_TIME, self.ltime - time + self.wait, train_wait);
                        self.train_wait_turning = TRUE;
                        return;
                }
                else // instant turning
-                       self.angles = org;
+                       self.angles = ang;
        }
 
        if(self.noise != "")