diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -61,7 +61,7 @@ CommandCost CmdStartStopVehicle(TileInde /* Disable the effect of p2 bit 0, when DC_AUTOREPLACE is not set */ if ((flags & DC_AUTOREPLACE) == 0) SetBit(p2, 0); - if (!IsValidVehicleID(p1)) return CMD_ERROR; + if (!Vehicle::IsValidID(p1)) return CMD_ERROR; Vehicle *v = Vehicle::Get(p1); @@ -334,7 +334,7 @@ CommandCost CmdCloneVehicle(TileIndex ti CommandCost total_cost(EXPENSES_NEW_VEHICLES); uint32 build_argument = 2; - if (!IsValidVehicleID(p1)) return CMD_ERROR; + if (!Vehicle::IsValidID(p1)) return CMD_ERROR; Vehicle *v = Vehicle::Get(p1); Vehicle *v_front = v; @@ -532,7 +532,7 @@ CommandCost SendAllVehiclesToDepot(Vehic */ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - if (!IsValidVehicleID(p1)) return CMD_ERROR; + if (!Vehicle::IsValidID(p1)) return CMD_ERROR; Vehicle *v = Vehicle::Get(p1); if (!CheckOwnership(v->owner)) return CMD_ERROR; @@ -565,7 +565,7 @@ CommandCost CmdChangeServiceInt(TileInde { uint16 serv_int = GetServiceIntervalClamped(p2); // Double check the service interval from the user-input - if (serv_int != p2 || !IsValidVehicleID(p1)) return CMD_ERROR; + if (serv_int != p2 || !Vehicle::IsValidID(p1)) return CMD_ERROR; Vehicle *v = Vehicle::Get(p1);