mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 23:26:34 +00:00
(svn r11236) -Fix [FS#1322]: DeleteVehicleChain can just work as good for all vehicles, instead of not allowing trains to use it (enforced by an assert), but actually using it for trains. Patch by SmatZ.
This commit is contained in:
parent
7140c35cda
commit
a71b7226c5
@ -564,13 +564,10 @@ Vehicle::~Vehicle()
|
|||||||
/**
|
/**
|
||||||
* Deletes all vehicles in a chain.
|
* Deletes all vehicles in a chain.
|
||||||
* @param v The first vehicle in the chain.
|
* @param v The first vehicle in the chain.
|
||||||
*
|
|
||||||
* @warning This function is not valid for any vehicle containing articulated
|
|
||||||
* parts.
|
|
||||||
*/
|
*/
|
||||||
void DeleteVehicleChain(Vehicle *v)
|
void DeleteVehicleChain(Vehicle *v)
|
||||||
{
|
{
|
||||||
assert(v->type != VEH_TRAIN && v->type != VEH_ROAD);
|
assert(v->First() == v);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
Vehicle *u = v;
|
Vehicle *u = v;
|
||||||
|
Loading…
Reference in New Issue
Block a user