Changeset - r16553:97a5aaaa977f
[Not reviewed]
master
0 3 0
frosch - 14 years ago 2010-11-21 18:39:12
frosch@openttd.org
(svn r21291) -Fix: Treat objects on water like water in more cases.
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2386,7 +2386,7 @@ CommandCost CmdBuildDock(TileIndex tile,
 
	direction = ReverseDiagDir(direction);
 

	
 
	/* Docks cannot be placed on rapids */
 
	if (IsWaterTile(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
 
	if (HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
 

	
 
	CommandCost ret = CheckIfAuthorityAllowsNewStation(tile, flags);
 
	if (ret.Failed()) return ret;
src/town_cmd.cpp
Show inline comments
 
@@ -1123,7 +1123,7 @@ static void GrowTownInTile(TileIndex *ti
 
		TileIndex house_tile = TileAddByDiagDir(tile, target_dir); // position of a possible house
 

	
 
		/* Don't walk into water. */
 
		if (IsWaterTile(house_tile)) return;
 
		if (HasTileWaterGround(house_tile)) return;
 

	
 
		if (!IsValidTile(house_tile)) return;
 

	
 
@@ -1172,7 +1172,7 @@ static void GrowTownInTile(TileIndex *ti
 
	}
 

	
 
	/* Return if a water tile */
 
	if (IsWaterTile(tile)) return;
 
	if (HasTileWaterGround(tile)) return;
 

	
 
	/* Make the roads look nicer */
 
	rcmd = CleanUpRoadBits(tile, rcmd);
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -525,7 +525,7 @@ CommandCost CmdBuildTunnel(TileIndex sta
 
	DiagDirection direction = GetInclinedSlopeDirection(start_tileh);
 
	if (direction == INVALID_DIAGDIR) return_cmd_error(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL);
 

	
 
	if (IsWaterTile(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
 
	if (HasTileWaterGround(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
 

	
 
	CommandCost ret = DoCommand(start_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 
	if (ret.Failed()) return ret;
 
@@ -582,7 +582,7 @@ CommandCost CmdBuildTunnel(TileIndex sta
 
	/* if the command fails from here on we want the end tile to be highlighted */
 
	_build_tunnel_endtile = end_tile;
 

	
 
	if (IsWaterTile(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
 
	if (HasTileWaterGround(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
 

	
 
	/* Clear the tile in any case */
 
	ret = DoCommand(end_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
0 comments (0 inline, 0 general)