1
0
Fork 0

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

release/1.0
frosch 2009-05-24 11:39:35 +00:00
parent 299f34b32b
commit 0337485284
1 changed files with 1 additions and 1 deletions

View File

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