diff options
author | tron <tron@openttd.org> | 2006-03-08 19:47:18 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-08 19:47:18 +0000 |
commit | cf7b94254e3eb3734a88ba737231e3eaa57eec6a (patch) | |
tree | 61a1cdc1a86051a847ca4b1db8c6e7ec9c9411ac | |
parent | 86550c94bc2ac30202d3df1f72804faf43f8f202 (diff) | |
download | openttd-cf7b94254e3eb3734a88ba737231e3eaa57eec6a.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
-rw-r--r-- | roadveh_cmd.c | 10 |
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 { |