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 | 75a46eb2cc73a0ee872dae4729da71cd08d9b7e3 (patch) | |
tree | c9f6c04076e2d50a97bcc4a06e415f5fc56e8cb2 /src | |
parent | 86f45574a8e7391545cd0c2738376d33aa862fbb (diff) | |
download | openttd-75a46eb2cc73a0ee872dae4729da71cd08d9b7e3.tar.xz |
(svn r11033) -Fix [FS#1184] (r11011): building articulated vehicles failed. Based on a patch by SmatZ.
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); |