1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 14:39:08 +00:00

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

This commit is contained in:
frosch
2009-05-24 11:39:35 +00:00
parent 299f34b32b
commit 0337485284

View File

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