mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 21:33:51 +00:00
(svn r14779) -Fix (r14747) [FS#2485]: selling an articulated vehicle removed only the first part and not the rest.
This commit is contained in:
parent
9a5f4f28f4
commit
5a6d3a601d
@ -938,7 +938,11 @@ static Vehicle *UnlinkWagon(Vehicle *v, Vehicle *first)
|
|||||||
if (v == NULL) return NULL;
|
if (v == NULL) return NULL;
|
||||||
|
|
||||||
if (IsTrainWagon(v)) SetFreeWagon(v);
|
if (IsTrainWagon(v)) SetFreeWagon(v);
|
||||||
first->SetNext(NULL);
|
|
||||||
|
/* First can be an articulated engine, meaning GetNextVehicle() isn't
|
||||||
|
* v->Next(). Thus set the next vehicle of the last articulated part
|
||||||
|
* and the last articulated part is just before the next vehicle (v). */
|
||||||
|
v->Previous()->SetNext(NULL);
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user