(svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself.

pull/155/head
frosch 15 years ago
parent a661b157ad
commit 8ae1c5d908

@ -333,7 +333,7 @@ void AddArticulatedParts(Vehicle *first, VehicleType type)
RoadVehicle *front = (RoadVehicle *)v;
RoadVehicle *rv = new RoadVehicle();
rv->subtype = 0;
previous->SetNext(u);
previous->SetNext(rv);
rv->rcache.first_engine = front->engine_type;
rv->rcache.cached_veh_length = 8; // Callback is called when the consist is finished
rv->state = RVSB_IN_DEPOT;

Loading…
Cancel
Save