diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/articulated_vehicles.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index 6fdfb1339..ab016802e 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -45,6 +45,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type) if (u->Next() == NULL) u->SetNext(new InvalidVehicle()); if (u->Next() == NULL) return; + Vehicle *previous = u; u = u->Next(); EngineID engine_type = GetFirstEngineOfType(type) + GB(callback, 0, 7); @@ -106,6 +107,8 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type) } break; } + previous->SetNext(u); + if (flip_image) u->spritenum++; VehiclePositionChanged(u); |