summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-10-05 08:39:16 +0000
committerbjarni <bjarni@openttd.org>2006-10-05 08:39:16 +0000
commitdae0f79eaa334c6ec703c09ba3e39969d51a1c76 (patch)
tree47a5c2f1fd0cee5c8019e32937cccdbaca41f661
parentb39aefba4fa141cc555aa714c9e2b8a77e91c2cd (diff)
downloadopenttd-dae0f79eaa334c6ec703c09ba3e39969d51a1c76.tar.xz
(svn r6648) -Codechange: simplified CmdDepotMassAutoReplace() by changing a switch-case into using a function, that was added in r6647
-rw-r--r--vehicle.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vehicle.c b/vehicle.c
index 44c7221a8..a5bf75597 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1720,10 +1720,7 @@ int32 CmdDepotMassAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
int32 ret;
/* Ensure that the vehicle completely in the depot */
- if ((vehicle_type == VEH_Train && !CheckTrainInDepot(v, false)) ||
- (vehicle_type == VEH_Road && !IsRoadVehInDepot(v) ) ||
- (vehicle_type == VEH_Ship && !IsShipInDepot(v) ) ||
- (vehicle_type == VEH_Aircraft && !IsAircraftInHangar(v)) ) continue;
+ if (!IsVehicleInDepot(v)) continue;
x = v->x_pos;
y = v->y_pos;