(svn r11047) -Fix (r11011) [FS#1205]: desync due to wrong cached vehicle length on articulated vehicle construction.

This commit is contained in:
rubidium 2007-09-05 17:53:14 +00:00
parent f7d1c125b1
commit 104300c9fa
1 changed files with 2 additions and 2 deletions

View File

@ -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);