summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-17 22:29:27 +0000
committersmatz <smatz@openttd.org>2007-12-17 22:29:27 +0000
commit0b08f7370ddd778da13ed5426c8c4d24fe0d5432 (patch)
tree4b515d99becc25cc7fb8461375ce7ffa41682f47 /src/road_cmd.cpp
parentbda9d4a23633c4ebb6ad18c29218deaf1a92d55d (diff)
downloadopenttd-0b08f7370ddd778da13ed5426c8c4d24fe0d5432.tar.xz
(svn r11657) -Fix: show better error message when trying to convert rail
-Codechange: merge DoConvert functions into one, make test and exec runs the same for tunnels/bridges
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 58ad42208..f6a2a8694 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -593,30 +593,6 @@ do_clear:;
return cost;
}
-/**
- * Switches the rail type on a level crossing.
- * @param tile The tile on which the railtype is to be convert.
- * @param totype The railtype we want to convert to
- * @param exec Switches between test and execute mode
- * @return The cost and state of the operation
- * @retval CMD_ERROR An error occured during the operation.
- */
-CommandCost DoConvertStreetRail(TileIndex tile, RailType totype, bool exec)
-{
- /* not a railroad crossing? */
- if (!IsLevelCrossing(tile)) return CMD_ERROR;
-
- if (exec) {
- SetRailType(tile, totype);
- MarkTileDirtyByTile(tile);
- YapfNotifyTrackLayoutChange(tile, FindFirstTrack(GetCrossingRailBits(tile)));
- VehicleFromPos(tile, NULL, &UpdateTrainPowerProc);
- }
-
- return CommandCost(RailConvertCost(GetRailType(tile), totype));
-}
-
-
/** Build a long piece of road.
* @param end_tile end tile of drag
* @param flags operation to perform