# HG changeset patch # User maedhros # Date 1180257450 0 # Node ID e5b7a61ea70fbfadaf686d6fafbe9af0c7d678b9 # Parent be09ee05aa14524c6e3208a782a7897d0586e9a8 (svn r9955) -Codechange: Make _roadveh_enter_depot_unk0 slightly less mysterious. diff -r be09ee05aa14 -r e5b7a61ea70f src/road_cmd.cpp --- a/src/road_cmd.cpp Sun May 27 08:53:21 2007 +0000 +++ b/src/road_cmd.cpp Sun May 27 09:17:30 2007 +0000 @@ -1250,8 +1250,12 @@ } } -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 @@ 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; }