summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-08 19:47:18 +0000
committertron <tron@openttd.org>2006-03-08 19:47:18 +0000
commit2bd2f75de2104b73ba878abac06692e86eaf8a4a (patch)
tree61a1cdc1a86051a847ca4b1db8c6e7ec9c9411ac /roadveh_cmd.c
parent463cf2ec6bc487aaf3c1ca6a5ea4bcca56194254 (diff)
downloadopenttd-2bd2f75de2104b73ba878abac06692e86eaf8a4a.tar.xz
(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
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index e49ac34b2..e00e60d1c 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -854,13 +854,13 @@ static Direction RoadVehGetNewDirection(const Vehicle* v, int x, int y)
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 {