summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-31 20:55:10 +0000
committerfrosch <frosch@openttd.org>2010-01-31 20:55:10 +0000
commit5f4f562d5333d8401157dfa0cef82e8788f21952 (patch)
tree569609a12b1e95366027870f9fd61e714f498274 /src
parentcbbe311cea7d7f9ec1d2c28691ef1ae9fc9b3047 (diff)
downloadopenttd-5f4f562d5333d8401157dfa0cef82e8788f21952.tar.xz
(svn r18975) -Cleanup: CMD_REMOVE_ROAD is unused.
Diffstat (limited to 'src')
-rw-r--r--src/command.cpp2
-rw-r--r--src/command_type.h1
-rw-r--r--src/road_cmd.cpp19
3 files changed, 0 insertions, 22 deletions
diff --git a/src/command.cpp b/src/command.cpp
index a4e4e5eb1..3a20b7e82 100644
--- 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
index 42e622025..a02ac750f 100644
--- 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
index 653f54ab4..477c35059 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -351,25 +351,6 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
}
-/** 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<RoadBits, 0>(p1);
-
- return RemoveRoad(tile, flags, pieces, rt, true);
-}
-
/**
* Calculate the costs for roads on slopes
* Aside modify the RoadBits to fit on the slopes