From a71b7226c58d9a71d017721ffc6fdd875bbfe68e Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 9 Oct 2007 20:53:25 +0000 Subject: (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. --- src/vehicle.cpp | 5 +---- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.3-54-g00ecf