MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / RemoveRailWaypoint

Function RemoveRailWaypoint

src/station_cmd.cpp:1964–1972  ·  view source on GitHub ↗

* Remove a rail waypoint * @param tile Tile of the waypoint. * @param flags operation to perform * @return cost or failure of operation */

Source from the content-addressed store, hash-verified

1962 * @return cost or failure of operation
1963 */
1964static CommandCost RemoveRailWaypoint(TileIndex tile, DoCommandFlags flags)
1965{
1966 /* if there is flooding, remove waypoints tile by tile */
1967 if (_current_company == OWNER_WATER) {
1968 return Command<CMD_REMOVE_FROM_RAIL_WAYPOINT>::Do(DoCommandFlag::Execute, tile, TileIndex{}, false);
1969 }
1970
1971 return RemoveRailStation(Waypoint::GetByTile(tile), flags, _price[PR_CLEAR_WAYPOINT_RAIL]);
1972}
1973
1974
1975/**

Callers 1

ClearTile_StationFunction · 0.85

Calls 1

RemoveRailStationFunction · 0.85

Tested by

no test coverage detected