diff options
author | rubidium <rubidium@openttd.org> | 2007-09-01 20:09:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-01 20:09:26 +0000 |
commit | 52e1d03ec73e5601f7b8275bed5a6273e54930ab (patch) | |
tree | c9f6c04076e2d50a97bcc4a06e415f5fc56e8cb2 | |
parent | 05581edf594a6d578451326e3af4aad8a55a986e (diff) | |
download | openttd-52e1d03ec73e5601f7b8275bed5a6273e54930ab.tar.xz |
(svn r11033) -Fix [FS#1184] (r11011): building articulated vehicles failed. Based on a patch by SmatZ.
-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); |