From 3e326085fa69da20e0a81182cbea4466016eb566 Mon Sep 17 00:00:00 2001 From: maedhros Date: Mon, 11 Jun 2007 14:00:16 +0000 Subject: (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for road vehicles for those who prefer the technical explanation. --- src/road_cmd.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/road_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf