town_cmd.c
branchcustombridgeheads
changeset 5590 dc34c43fc3eb
parent 5573 afa6f92a71fd
child 5623 ef2a8a524a95
equal deleted inserted replaced
5589:0375bd469024 5590:dc34c43fc3eb
    66 			case MP_HOUSE:
    66 			case MP_HOUSE:
    67 				if (GetTownByTile(tile) == t) DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
    67 				if (GetTownByTile(tile) == t) DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
    68 				break;
    68 				break;
    69 
    69 
    70 			case MP_STREET:
    70 			case MP_STREET:
    71 			case MP_TUNNELBRIDGE:
    71 			case MP_TUNNEL:
       
    72 			case MP_STREET_BRIDGE:
    72 				if (IsTileOwner(tile, OWNER_TOWN) &&
    73 				if (IsTileOwner(tile, OWNER_TOWN) &&
    73 						ClosestTownFromTile(tile, (uint)-1) == t)
    74 						ClosestTownFromTile(tile, (uint)-1) == t)
    74 					DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
    75 					DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
    75 				break;
    76 				break;
    76 
    77 
   617 			*tile_ptr = GetOtherTunnelEnd(tile);
   618 			*tile_ptr = GetOtherTunnelEnd(tile);
   618 			return;
   619 			return;
   619 		}
   620 		}
   620 
   621 
   621 		// For any other kind of tunnel/bridge, bail out.
   622 		// For any other kind of tunnel/bridge, bail out.
   622 		if (IsTileType(tile, MP_TUNNELBRIDGE)) return;
   623 		if (IsTileType(tile, MP_TUNNEL)) return;
       
   624 		if (IsTileType(tile, MP_RAILWAY_BRIDGE)) return;
   623 
   625 
   624 		// Possibly extend the road in a direction.
   626 		// Possibly extend the road in a direction.
   625 		// Randomize a direction and if it has a road, bail out.
   627 		// Randomize a direction and if it has a road, bail out.
   626 		i = GB(Random(), 0, 2);
   628 		i = GB(Random(), 0, 2);
   627 		if (HASBIT(mask, i)) return;
   629 		if (HASBIT(mask, i)) return;