summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-10-09 20:53:25 +0000
committerrubidium <rubidium@openttd.org>2007-10-09 20:53:25 +0000
commit038c98bee36f2f493cc4c1506e00e3498db4902e (patch)
tree18ddeec0c8b5b06b7d58262ad5d3c3757ae86984
parent46244481872cfd54df64e8bef7a7a872a73722ef (diff)
downloadopenttd-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.
-rw-r--r--src/vehicle.cpp5
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;