mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 07:59:09 +00:00
(svn r11033) -Fix [FS#1184] (r11011): building articulated vehicles failed. Based on a patch by SmatZ.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user