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 004cf95..82f2695 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 f1f8631..4b0adbf 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 != "")