mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11033) -Fix [FS#1184] (r11011): building articulated vehicles failed. Based on a patch by SmatZ.
This commit is contained in:
parent
05581edf59
commit
52e1d03ec7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue