diff options
author | peter1138 <peter1138@openttd.org> | 2017-03-20 18:14:22 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2017-03-20 18:14:22 +0000 |
commit | 2e27a35f1bc6d547bb41d6b44b8822867ee6dfb0 (patch) | |
tree | 4a8a44773c349ebabd3718cbf8773abaaf1ea984 /src | |
parent | 6d0f8ec7b927a3b709934a7c77cbc62dc46a5784 (diff) | |
download | openttd-2e27a35f1bc6d547bb41d6b44b8822867ee6dfb0.tar.xz |
(svn r27813) -Change: Remove _road_enter_dir_to_reachable_trackdirs
_road_enter_dir_to_reachable_trackdirs was just a copy of
DiagdirReachesTrackdirs. (cirdan)
Diffstat (limited to 'src')
-rw-r--r-- | src/roadveh_cmd.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 9b541a766..25f6fd50b 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -69,14 +69,6 @@ bool IsValidImageIndex<VEH_ROAD>(uint8 image_index) return image_index < lengthof(_roadveh_images); } -/** 'Convert' the DiagDirection where a road vehicle enters to the trackdirs it can drive onto */ -static const TrackdirBits _road_enter_dir_to_reachable_trackdirs[DIAGDIR_END] = { - TRACKDIR_BIT_LEFT_N | TRACKDIR_BIT_LOWER_E | TRACKDIR_BIT_X_NE, // Enter from north east - TRACKDIR_BIT_LEFT_S | TRACKDIR_BIT_UPPER_E | TRACKDIR_BIT_Y_SE, // Enter from south east - TRACKDIR_BIT_UPPER_W | TRACKDIR_BIT_X_SW | TRACKDIR_BIT_RIGHT_S, // Enter from south west - TRACKDIR_BIT_RIGHT_N | TRACKDIR_BIT_LOWER_W | TRACKDIR_BIT_Y_NW // Enter from north west -}; - static const Trackdir _road_reverse_table[DIAGDIR_END] = { TRACKDIR_RVREV_NE, TRACKDIR_RVREV_SE, TRACKDIR_RVREV_SW, TRACKDIR_RVREV_NW }; @@ -935,7 +927,7 @@ static Trackdir RoadFindPathToDest(RoadVehicle *v, TileIndex tile, DiagDirection */ /* Remove tracks unreachable from the enter dir */ - trackdirs &= _road_enter_dir_to_reachable_trackdirs[enterdir]; + trackdirs &= DiagdirReachesTrackdirs(enterdir); if (trackdirs == TRACKDIR_BIT_NONE) { /* No reachable tracks, so we'll reverse */ return_track(_road_reverse_table[enterdir]); |