diff options
author | rubidium <rubidium@openttd.org> | 2007-10-09 20:53:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-09 20:53:25 +0000 |
commit | 038c98bee36f2f493cc4c1506e00e3498db4902e (patch) | |
tree | 18ddeec0c8b5b06b7d58262ad5d3c3757ae86984 /src | |
parent | 46244481872cfd54df64e8bef7a7a872a73722ef (diff) | |
download | openttd-038c98bee36f2f493cc4c1506e00e3498db4902e.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 93f48c92c..7e60e3bad 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -564,13 +564,10 @@ Vehicle::~Vehicle() /** * Deletes all vehicles in a 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) { - assert(v->type != VEH_TRAIN && v->type != VEH_ROAD); + assert(v->First() == v); do { Vehicle *u = v; |