(svn r3796) When unmagicfying code, do it Right(tm) and also give the variables sensible names. I flipped a 'b' and a 'd' in r3785
authortron
Wed, 08 Mar 2006 19:47:18 +0000
changeset 3168 34cfe6f61a12
parent 3167 197b5ee5a831
child 3169 b7ee0268325c
(svn r3796) When unmagicfying code, do it Right(tm) and also give the variables sensible names. I flipped a 'b' and a 'd' in r3785
roadveh_cmd.c
--- a/roadveh_cmd.c	Wed Mar 08 15:29:23 2006 +0000
+++ b/roadveh_cmd.c	Wed Mar 08 19:47:18 2006 +0000
@@ -854,13 +854,13 @@
 
 static Direction RoadVehGetSlidingDirection(const Vehicle* v, int x, int y)
 {
-	Direction b = RoadVehGetNewDirection(v, x, y);
-	Direction d = v->direction;
+	Direction new = RoadVehGetNewDirection(v, x, y);
+	Direction old = v->direction;
 	DirDiff delta;
 
-	if (b == d) return d;
-	delta = (DirDifference(d, b) > DIRDIFF_REVERSE ? DIRDIFF_45LEFT : DIRDIFF_45RIGHT);
-	return ChangeDir(d, delta);
+	if (new == old) return old;
+	delta = (DirDifference(new, old) > DIRDIFF_REVERSE ? DIRDIFF_45LEFT : DIRDIFF_45RIGHT);
+	return ChangeDir(old, delta);
 }
 
 typedef struct OvertakeData {