Changeset - r14408:29a42a678b37
[Not reviewed]
master
0 3 0
frosch - 14 years ago 2010-01-31 20:55:10
frosch@openttd.org
(svn r18975) -Cleanup: CMD_REMOVE_ROAD is unused.
3 files changed with 0 insertions and 22 deletions:
0 comments (0 inline, 0 general)
src/command.cpp
Show inline comments
 
@@ -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
src/command_type.h
Show inline comments
 
@@ -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
src/road_cmd.cpp
Show inline comments
 
@@ -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<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
0 comments (0 inline, 0 general)