diff --git a/src/command.cpp b/src/command.cpp --- a/src/command.cpp +++ b/src/command.cpp @@ -65,7 +65,6 @@ CommandProc CmdRemoveRoadStop; CommandProc CmdBuildLongRoad; CommandProc CmdRemoveLongRoad; CommandProc CmdBuildRoad; -CommandProc CmdRemoveRoad; CommandProc CmdBuildRoadDepot; @@ -222,7 +221,6 @@ static const Command _command_proc_table {CmdBuildLongRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_LONG_ROAD {CmdRemoveLongRoad, CMD_NO_TEST | CMD_AUTO}, // CMD_REMOVE_LONG_ROAD; towns may disallow removing road bits (as they are connected) in test, but in exec they're removed and thus removing is allowed. {CmdBuildRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD - {CmdRemoveRoad, 0}, // CMD_REMOVE_ROAD {CmdBuildRoadDepot, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD_DEPOT {CmdBuildAirport, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_AIRPORT diff --git a/src/command_type.h b/src/command_type.h --- a/src/command_type.h +++ b/src/command_type.h @@ -188,7 +188,6 @@ enum { CMD_BUILD_LONG_ROAD, ///< build a complete road (not a "half" one) CMD_REMOVE_LONG_ROAD, ///< remove a complete road (not a "half" one) CMD_BUILD_ROAD, ///< build a "half" road - CMD_REMOVE_ROAD, ///< remove a "half" road CMD_BUILD_ROAD_DEPOT, ///< build a road depot CMD_BUILD_AIRPORT, ///< build an airport diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -351,25 +351,6 @@ static CommandCost RemoveRoad(TileIndex } -/** Delete a piece of road. - * @param tile tile where to remove road from - * @param flags operation to perform - * @param p1 bit 0..3 road pieces to remove (RoadBits) - * bit 4..5 road type - * @param p2 unused - * @param text unused - * @return the cost of this operation or an error - */ -CommandCost CmdRemoveRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) -{ - RoadType rt = (RoadType)GB(p1, 4, 2); - if (!IsValidRoadType(rt)) return CMD_ERROR; - - RoadBits pieces = Extract(p1); - - return RemoveRoad(tile, flags, pieces, rt, true); -} - /** * Calculate the costs for roads on slopes * Aside modify the RoadBits to fit on the slopes