summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
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
commita71b7226c58d9a71d017721ffc6fdd875bbfe68e (patch)
tree18ddeec0c8b5b06b7d58262ad5d3c3757ae86984 /src/vehicle.cpp
parent7140c35cda9705da15a062dc43d8cad3a521987f (diff)
downloadopenttd-a71b7226c58d9a71d017721ffc6fdd875bbfe68e.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/vehicle.cpp')
-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;