summaryrefslogtreecommitdiff
path: root/src/npf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-02-20 17:49:50 +0000
committerfrosch <frosch@openttd.org>2008-02-20 17:49:50 +0000
commitb7993793c813359ba4963df93d49a80335ddca36 (patch)
treed325400c42801ac23226ccaf0d71008e4e3598ec /src/npf.cpp
parent9e651575481dbdd4b587fe22e2d79b998bcbbe15 (diff)
downloadopenttd-b7993793c813359ba4963df93d49a80335ddca36.tar.xz
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
Diffstat (limited to 'src/npf.cpp')
-rw-r--r--src/npf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/npf.cpp b/src/npf.cpp
index 3b6e71466..14cebac9e 100644
--- a/src/npf.cpp
+++ b/src/npf.cpp
@@ -607,8 +607,7 @@ static bool CanEnterTile(TileIndex tile, DiagDirection dir, TransportType type,
*/
static TrackdirBits GetDriveableTrackdirBits(TileIndex dst_tile, Trackdir src_trackdir, TransportType type, uint subtype)
{
- uint32 ts = GetTileTrackStatus(dst_tile, type, subtype);
- TrackdirBits trackdirbits = (TrackdirBits)(ts & TRACKDIR_BIT_MASK);
+ TrackdirBits trackdirbits = TrackStatusToTrackdirBits(GetTileTrackStatus(dst_tile, type, subtype));
if (trackdirbits == 0 && type == TRANSPORT_ROAD && HasBit(subtype, ROADTYPE_TRAM)) {
/* GetTileTrackStatus() returns 0 for single tram bits.