From c4dd62914aa9e4cf45bcfc8cf85b0b70fd805b02 Mon Sep 17 00:00:00 2001 From: bjarni Date: Mon, 22 Jan 2007 16:48:36 +0000 Subject: (svn r8353) -Cleanup: added IsPlayerBuildableVehicleType() to autoreplace code (duplicated code removal) --- src/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 588a85152..ba52ecee8 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2152,7 +2152,7 @@ static int32 MaybeReplaceVehicle(Vehicle *v, bool check, bool display_costs) _current_player = v->owner; - assert(v->type == VEH_Train || v->type == VEH_Road || v->type == VEH_Ship || v->type == VEH_Aircraft); + assert(IsPlayerBuildableVehicleType(v)); assert(v->vehstatus & VS_STOPPED); // the vehicle should have been stopped in VehicleEnteredDepotThisTick() if needed -- cgit v1.2.3-70-g09d2