diff options
author | rubidium <rubidium@openttd.org> | 2007-09-05 17:53:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-05 17:53:14 +0000 |
commit | 104300c9fae8923edcf85f3b4f5b69e780f45887 (patch) | |
tree | 3d13669e42128617dfe5eb9d71b20c729470aadc /src | |
parent | f7d1c125b1810cf7a84eb632b42a280389e4ed04 (diff) | |
download | openttd-104300c9fae8923edcf85f3b4f5b69e780f45887.tar.xz |
(svn r11047) -Fix (r11011) [FS#1205]: desync due to wrong cached vehicle length on articulated vehicle construction.
Diffstat (limited to 'src')
-rw-r--r-- | src/articulated_vehicles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index ab016802e..ad83d6d5a 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -77,6 +77,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type) const RailVehicleInfo *rvi_artic = RailVehInfo(engine_type); u = new (u) Train(); + previous->SetNext(u); u->u.rail.track = v->u.rail.track; u->u.rail.railtype = v->u.rail.railtype; u->u.rail.first_engine = v->engine_type; @@ -92,6 +93,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type) const RoadVehicleInfo *rvi_artic = RoadVehInfo(engine_type); u = new (u) RoadVehicle(); + previous->SetNext(u); u->u.road.first_engine = v->engine_type; u->u.road.cached_veh_length = GetRoadVehLength(u); u->u.road.state = RVSB_IN_DEPOT; @@ -107,8 +109,6 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type) } break; } - previous->SetNext(u); - if (flip_image) u->spritenum++; VehiclePositionChanged(u); |