summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-01-22 16:48:36 +0000
committerbjarni <bjarni@openttd.org>2007-01-22 16:48:36 +0000
commitedf2f705653455a4af83e17b8e7e7293a9de50ed (patch)
tree7e9747e1ac0a48e19f899210c09a8449aa73eda6 /src
parent35c80532e9823389b9435989675e54740910b659 (diff)
downloadopenttd-edf2f705653455a4af83e17b8e7e7293a9de50ed.tar.xz
(svn r8353) -Cleanup: added IsPlayerBuildableVehicleType() to autoreplace code (duplicated code removal)
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
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