summaryrefslogtreecommitdiff
path: root/src/npf.cpp
diff options
context:
space:
mode:
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.