src/tunnelbridge_cmd.cpp
changeset 7739 0b6f3da5c083
parent 7730 4293ba29ce21
child 7758 17ad53748c7b
equal deleted inserted replaced
7738:1c288fd7f2bc 7739:0b6f3da5c083
   241 	if (!CheckBridge_Stuff(bridge_type, bridge_len)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
   241 	if (!CheckBridge_Stuff(bridge_type, bridge_len)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
   242 
   242 
   243 	/* retrieve landscape height and ensure it's on land */
   243 	/* retrieve landscape height and ensure it's on land */
   244 	tile_start = TileXY(x, y);
   244 	tile_start = TileXY(x, y);
   245 	tile_end = TileXY(sx, sy);
   245 	tile_end = TileXY(sx, sy);
   246 	if (IsClearWaterTile(tile_start) || IsClearWaterTile(tile_end)) {
   246 	if (IsWaterTile(tile_start) || IsWaterTile(tile_end)) {
   247 		return_cmd_error(STR_02A0_ENDS_OF_BRIDGE_MUST_BOTH);
   247 		return_cmd_error(STR_02A0_ENDS_OF_BRIDGE_MUST_BOTH);
   248 	}
   248 	}
   249 
   249 
   250 	tileh_start = GetTileSlope(tile_start, &z_start);
   250 	tileh_start = GetTileSlope(tile_start, &z_start);
   251 	tileh_end = GetTileSlope(tile_end, &z_end);
   251 	tileh_end = GetTileSlope(tile_end, &z_end);