src/town_cmd.cpp
changeset 8083 ad22eade501f
parent 7969 5f1292aa867f
child 8088 92fca5b09665
equal deleted inserted replaced
8082:63240e1bd6cc 8083:ad22eade501f
    42 #include "newgrf_townname.h"
    42 #include "newgrf_townname.h"
    43 #include "misc/autoptr.hpp"
    43 #include "misc/autoptr.hpp"
    44 #include "autoslope.h"
    44 #include "autoslope.h"
    45 #include "waypoint.h"
    45 #include "waypoint.h"
    46 #include "transparency.h"
    46 #include "transparency.h"
       
    47 #include "tunnelbridge_map.h"
       
    48 
    47 
    49 
    48 /* Initialize the town-pool */
    50 /* Initialize the town-pool */
    49 DEFINE_OLD_POOL_GENERIC(Town, Town)
    51 DEFINE_OLD_POOL_GENERIC(Town, Town)
    50 
    52 
    51 Town::Town(TileIndex tile)
    53 Town::Town(TileIndex tile)
  1060 	} else {
  1062 	} else {
  1061 		bool allow_house = false; // Value which decides if we want to construct a house
  1063 		bool allow_house = false; // Value which decides if we want to construct a house
  1062 
  1064 
  1063 		/* Reached a tunnel/bridge? Then continue at the other side of it. */
  1065 		/* Reached a tunnel/bridge? Then continue at the other side of it. */
  1064 		if (IsTileType(tile, MP_TUNNELBRIDGE)) {
  1066 		if (IsTileType(tile, MP_TUNNELBRIDGE)) {
  1065 			if (IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_ROAD) {
  1067 			if (IsTunnel(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) {
  1066 				*tile_ptr = GetOtherTunnelEnd(tile);
  1068 				*tile_ptr = GetOtherTunnelEnd(tile);
  1067 			} else if (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_ROAD) {
  1069 			} else if (IsBridge(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) {
  1068 				*tile_ptr = GetOtherBridgeEnd(tile);
  1070 				*tile_ptr = GetOtherBridgeEnd(tile);
  1069 			}
  1071 			}
  1070 			return;
  1072 			return;
  1071 		}
  1073 		}
  1072 
  1074