# HG changeset patch # User bjarni # Date 2007-01-22 16:48:36 # Node ID 197ed16e023132e233813163368a1083b04b5c42 # Parent 9b6cdefbeeeaf6e36be7cae6299cc9cb06ac0f55 (svn r8353) -Cleanup: added IsPlayerBuildableVehicleType() to autoreplace code (duplicated code removal) diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2152,7 +2152,7 @@ static int32 MaybeReplaceVehicle(Vehicle _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