diff options
author | tron <tron@openttd.org> | 2006-03-03 19:42:09 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-03 19:42:09 +0000 |
commit | 40fd4377b0d2dbd7b6d3d0d3aa792fa7b1ec3984 (patch) | |
tree | 33b8df8ca1efa38a8227dd2ec34da277aed9c554 /pathfind.c | |
parent | 5b0e6f90a9a18ed549ebb70a1e1af35ef76361ef (diff) | |
download | openttd-40fd4377b0d2dbd7b6d3d0d3aa792fa7b1ec3984.tar.xz |
(svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither)
Diffstat (limited to 'pathfind.c')
-rw-r--r-- | pathfind.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pathfind.c b/pathfind.c index 9ece86052..15b8efef5 100644 --- a/pathfind.c +++ b/pathfind.c @@ -388,8 +388,8 @@ void FollowTrack(TileIndex tile, uint16 flags, byte direction, TPFEnumProc *enum tpf.var2 = HASBIT(flags, 15) ? 0x43 : 0xFF; /* 0x8000 */ - tpf.disable_tile_hash = HASBIT(flags, 12) != 0; /* 0x1000 */ - tpf.hasbit_13 = HASBIT(flags, 13) != 0; /* 0x2000 */ + tpf.disable_tile_hash = HASBIT(flags, 12); /* 0x1000 */ + tpf.hasbit_13 = HASBIT(flags, 13); /* 0x2000 */ tpf.tracktype = (byte)flags; |