diff options
author | maedhros <maedhros@openttd.org> | 2007-06-11 14:00:16 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-06-11 14:00:16 +0000 |
commit | c186f91cbd68a08494b8e2ab1dda4eccb4175982 (patch) | |
tree | 890b370c5bc0ffbb3bd5a9eb55a4b0a3117acd29 /src/road_cmd.cpp | |
parent | 4cd71ef4fe098486744d13643ea7cf77d938e5c8 (diff) | |
download | openttd-c186f91cbd68a08494b8e2ab1dda4eccb4175982.tar.xz |
(svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r-- | src/road_cmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 275cad922..48c9ef3a9 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -13,6 +13,7 @@ #include "table/sprites.h" #include "table/strings.h" #include "functions.h" +#include "window.h" #include "map.h" #include "landscape.h" #include "tile.h" @@ -1359,7 +1360,13 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y) if (v->type == VEH_ROAD && v->u.road.frame == 11 && _roadveh_enter_depot_dir[GetRoadDepotDirection(tile)] == v->u.road.state) { - VehicleEnterDepot(v); + v->u.road.state = RVSB_IN_DEPOT; + v->vehstatus |= VS_HIDDEN; + v->direction = ReverseDir(v->direction); + if (v->next == NULL) VehicleEnterDepot(v); + v->tile = tile; + + InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); return VETSB_ENTERED_WORMHOLE; } break; |