When it comes to vices, James Bond may be known for martinis , but a new study finds that he's been quite the smoker as well. And although 007 kicked the habit in 2002, he still faces the scourge of secondhand smoke, the research found.

In the study, the researchers reviewed Bond's smoking habits, as well as those of his friends, lovers and enemies, over the course of all 24 Bond films.

In the 1960s, Bond's smoking was at its peak; he lit up in 83 percent of the films in that decade, according to the study, published Jan. 16 in the journal Tobacco Control . And when he was smoking regularly in the movies, the first cigarette was lit, on average, within the first 20 minutes of the film.

After the '60s, however, Bond's smoking declined — as did the American public's, CDC statistics show —and ended with the 2002 film "Die Another Day," when the spy stubbed out his last cigarette, the researchers found.

More From LiveScience

Despite the downward trends in smoking in the Bond movies, the smoking imagery "remains problematic from a public health perspective, especially given the popularity of this movie series," the researchers, led by Dr. Nick Wilson, a professor of public health at the University of Otago in New Zealand, wrote. For example, the most recent Bond movie, 2015's " "Spectre," featured several minor characters smoking cigarettes, and created an estimated 261 million "tobacco impressions" for Americans ages 10 to 29, the researchers wrote. "Tobacco impressions" refer to the number of smoking incidents in the movie, multiplied by the number of in-theater views, the researchers said.

Only one Bond movie — 2006's "Casino Royale" — contains no smokers, according to the study.

Moreover, many of Bond's sexual partners smoked, often while next to him in bed, which would have exposed Bond to high levels of secondhand smoke, the researchers said. In the 1960s, '70s and '80s, as well as in the 2010s, around 20 percent of Bond's sexual partners smoked, according to the study. And in one incident, in 1971's "Diamonds Are Forever," love interest Tiffany Case used an ashtray placed on Bond's bare chest. Of course, given the typically brief nature of Bond's relationships, the total amount of secondhand smoke he was exposed to would have remained low, the researchers added. And in the Bond movies released in the 1990s and 2000s, none of 007's partners smoked, the researchers noted.

In addition, the researchers found that, in the 1970s, the use of smoking-related spy gadgets — such as a "rocket in a cigarette" — peaked, with these devices appearing in 80 percent of the movies.

Though smoking was featured prominently in the Bond movies of the '60s and '70s, references to the dangers of smoking also appeared in the films from those decades, according to the study.

The first mention came in 1967's "You Only Live Twice," when Mr. Osato finds Bond's cigarettes and tells him, "You should give up smoking. Cigarettes are very bad for your chest." Later in the same movie, another villain, Blofeld, tells him, "It won't be the nicotine that kills you, Mr. Bond." And by 1997's "Tomorrow Never Dies," Bond describes smoking as a "filthy habit," the researchers said.

Bond's smoking seems to be "at odds with his need for physical fitness as part of his job, his high level of education and his vast knowledge on many topics," the researchers wrote. "But it does fit with a possible perception of a low life expectancy given a cumulative total of thousands of bullets being fired at him" and the increasing levels of severe violence in the films , they wrote. Plus, 15 percent of Bond's sexual partners have tried to disable, capture or kill him, they added.

This is not the first study to explore Bond's bad habits; earlier studies have looked into the spy's drinking and violent behavior, the researchers noted.

Originally published on Live Science .