mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-25 15:39:09 +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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user