summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-05 17:53:14 +0000
committerrubidium <rubidium@openttd.org>2007-09-05 17:53:14 +0000
commite4be90829c906c62a65f0bfe99c71241474ab0fa (patch)
tree3d13669e42128617dfe5eb9d71b20c729470aadc /src
parent128e71cde957545fc4229097432f2bbc0a3115fa (diff)
downloadopenttd-e4be90829c906c62a65f0bfe99c71241474ab0fa.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.cpp4
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);