summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-11 14:00:16 +0000
committermaedhros <maedhros@openttd.org>2007-06-11 14:00:16 +0000
commit3e326085fa69da20e0a81182cbea4466016eb566 (patch)
tree890b370c5bc0ffbb3bd5a9eb55a4b0a3117acd29 /src/road_cmd.cpp
parentbe0f5cf877bb2d7a74855f8988e50ca09624aabe (diff)
downloadopenttd-3e326085fa69da20e0a81182cbea4466016eb566.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.cpp9
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;