(svn r6648) -Codechange: simplified CmdDepotMassAutoReplace() by changing a switch-case into using a function, that was added in r6647

This commit is contained in:
bjarni 2006-10-05 08:39:16 +00:00
parent 55c7840710
commit 16271dfaac
1 changed files with 1 additions and 4 deletions

View File

@ -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;