From 2e27a35f1bc6d547bb41d6b44b8822867ee6dfb0 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 20 Mar 2017 18:14:22 +0000 Subject: (svn r27813) -Change: Remove _road_enter_dir_to_reachable_trackdirs _road_enter_dir_to_reachable_trackdirs was just a copy of DiagdirReachesTrackdirs. (cirdan) --- src/roadveh_cmd.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src') 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(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]); -- cgit v1.2.3-70-g09d2