From 2c960a8eaf5e3c4c95fdf8cff3522701332f05ae Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Thu, 24 May 2012 22:32:11 +0300 Subject: [PATCH] Name angle floats more correctly --- qcsrc/server/g_subs.qc | 10 +++++----- qcsrc/server/t_plats.qc | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index 004cf950c..82f2695a8 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -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 { diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index f1f863196..4b0adbfa1 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -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 != "") -- 2.39.2