diff options
author | maedhros <maedhros@openttd.org> | 2007-05-27 09:17:30 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-05-27 09:17:30 +0000 |
commit | 4f6ffd4e12543cefda3c9708cc3a766bf5c45184 (patch) | |
tree | 7f07dd1af7fbb769758407c94a39b5693681b499 /src | |
parent | 3b267df0af3539d0a45758d0b7f3a489e580e542 (diff) | |
download | openttd-4f6ffd4e12543cefda3c9708cc3a766bf5c45184.tar.xz |
(svn r9955) -Codechange: Make _roadveh_enter_depot_unk0 slightly less mysterious.
Diffstat (limited to 'src')
-rw-r--r-- | src/road_cmd.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index d9f616e66..fd79bd665 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1250,8 +1250,12 @@ static void GetTileDesc_Road(TileIndex tile, TileDesc *td) } } -static const byte _roadveh_enter_depot_unk0[4] = { - 8, 9, 0, 1 +/** + * Given the direction the road depot is pointing, this is the direction the + * vehicle should be travelling in in order to enter the depot. + */ +static const byte _roadveh_enter_depot_dir[4] = { + TRACKDIR_X_SW, TRACKDIR_Y_NW, TRACKDIR_X_NE, TRACKDIR_Y_SE }; static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y) @@ -1269,7 +1273,7 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y) case ROAD_TILE_DEPOT: if (v->type == VEH_ROAD && v->u.road.frame == 11 && - _roadveh_enter_depot_unk0[GetRoadDepotDirection(tile)] == v->u.road.state) { + _roadveh_enter_depot_dir[GetRoadDepotDirection(tile)] == v->u.road.state) { VehicleEnterDepot(v); return VETSB_ENTERED_WORMHOLE; } |