summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-20 18:16:23 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-20 18:16:23 +0000
commitc3ae3989c20b59fefee2006d8f2b76021dd388ff (patch)
tree3145ee5f1d09b85c7708b4886115d60253b0f909 /src
parent2e27a35f1bc6d547bb41d6b44b8822867ee6dfb0 (diff)
downloadopenttd-c3ae3989c20b59fefee2006d8f2b76021dd388ff.tar.xz
(svn r27814) -Change: Remove _roadveh_depot_exit_trackdir
_roadveh_depot_exit_trackdir was just a copy of DiagDirToDiagTrackdir. (cirdan)
Diffstat (limited to 'src')
-rw-r--r--src/roadveh_cmd.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 25f6fd50b..7adc532b6 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -73,12 +73,6 @@ static const Trackdir _road_reverse_table[DIAGDIR_END] = {
TRACKDIR_RVREV_NE, TRACKDIR_RVREV_SE, TRACKDIR_RVREV_SW, TRACKDIR_RVREV_NW
};
-/** Converts the exit direction of a depot to trackdir the vehicle is going to drive to */
-static const Trackdir _roadveh_depot_exit_trackdir[DIAGDIR_END] = {
- TRACKDIR_X_NE, TRACKDIR_Y_SE, TRACKDIR_X_SW, TRACKDIR_Y_NW
-};
-
-
/**
* Check whether a roadvehicle is a bus
* @return true if bus
@@ -993,7 +987,7 @@ static bool RoadVehLeaveDepot(RoadVehicle *v, bool first)
DiagDirection dir = GetRoadDepotDirection(v->tile);
v->direction = DiagDirToDir(dir);
- Trackdir tdir = _roadveh_depot_exit_trackdir[dir];
+ Trackdir tdir = DiagDirToDiagTrackdir(dir);
const RoadDriveEntry *rdp = _road_drive_data[v->roadtype][(_settings_game.vehicle.road_side << RVS_DRIVE_SIDE) + tdir];
int x = TileX(v->tile) * TILE_SIZE + (rdp[RVC_DEPOT_START_FRAME].x & 0xF);