MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / addSmoke

Method addSmoke

src/Savegame/Tile.cpp:657–672  ·  view source on GitHub ↗

* Set the amount of turns this tile is smoking. 0 = no smoke. * @param smoke : amount of turns this tile is smoking. */

Source from the content-addressed store, hash-verified

655 * @param smoke : amount of turns this tile is smoking.
656 */
657void Tile::addSmoke(int smoke)
658{
659 if (_fire == 0)
660 {
661 if (_overlaps == 0)
662 {
663 _smoke = std::max(1, std::min(_smoke + smoke, 15));
664 }
665 else
666 {
667 _smoke += smoke;
668 }
669 _animationOffset = RNG::generate(0,3);
670 addOverlap();
671 }
672}
673
674/**
675 * Set the amount of turns this tile is smoking. 0 = no smoke.

Callers 1

prepareNewTurnMethod · 0.80

Calls 1

generateFunction · 0.85

Tested by

no test coverage detected