File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -658,7 +658,15 @@ void Map::drawTerrain(Surface *surface)
658658 int shade = 0 ;
659659 if (!tileWest->getFire ())
660660 {
661- frameNumber = 8 + int (floor ((tileWest->getSmoke () / 6.0 ) - 0.1 )); // see http://www.ufopaedia.org/images/c/cb/Smoke.gif
661+ if (_save->getDepth () > 0 )
662+ {
663+ frameNumber += ResourcePack::UNDERWATER_SMOKE_OFFSET ;
664+ }
665+ else
666+ {
667+ frameNumber += ResourcePack::SMOKE_OFFSET ;
668+ }
669+ frameNumber += int (floor ((tileWest->getSmoke () / 6.0 ) - 0.1 )); // see http://www.ufopaedia.org/images/c/cb/Smoke.gif
662670 shade = tileWestShade;
663671 }
664672
@@ -898,7 +906,15 @@ void Map::drawTerrain(Surface *surface)
898906 int shade = 0 ;
899907 if (!tile->getFire ())
900908 {
901- frameNumber = 8 + int (floor ((tile->getSmoke () / 6.0 ) - 0.1 )); // see http://www.ufopaedia.org/images/c/cb/Smoke.gif
909+ if (_save->getDepth () > 0 )
910+ {
911+ frameNumber += ResourcePack::UNDERWATER_SMOKE_OFFSET ;
912+ }
913+ else
914+ {
915+ frameNumber += ResourcePack::SMOKE_OFFSET ;
916+ }
917+ frameNumber += int (floor ((tile->getSmoke () / 6.0 ) - 0.1 )); // see http://www.ufopaedia.org/images/c/cb/Smoke.gif
902918 shade = tileShade;
903919 }
904920
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ int ResourcePack::SLIDING_DOOR_CLOSE = 21;
3636int ResourcePack::SMALL_EXPLOSION = 2 ;
3737int ResourcePack::LARGE_EXPLOSION = 5 ;
3838int ResourcePack::EXPLOSION_OFFSET = 0 ;
39+ int ResourcePack::SMOKE_OFFSET = 8 ;
40+ int ResourcePack::UNDERWATER_SMOKE_OFFSET = 0 ;
3941int ResourcePack::ITEM_DROP = 38 ;
4042int ResourcePack::ITEM_THROW = 39 ;
4143int ResourcePack::ITEM_RELOAD = 17 ;
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ class ResourcePack
6666 static int SMALL_EXPLOSION ;
6767 static int LARGE_EXPLOSION ;
6868 static int EXPLOSION_OFFSET ;
69+ static int SMOKE_OFFSET ;
70+ static int UNDERWATER_SMOKE_OFFSET ;
6971 static int ITEM_DROP ;
7072 static int ITEM_THROW ;
7173 static int ITEM_RELOAD ;
Original file line number Diff line number Diff line change @@ -529,6 +529,8 @@ void Ruleset::loadFile(const std::string &filename)
529529 ResourcePack::SMALL_EXPLOSION = (*i)[" smallExplosion" ].as <int >(ResourcePack::SMALL_EXPLOSION );
530530 ResourcePack::LARGE_EXPLOSION = (*i)[" largeExplosion" ].as <int >(ResourcePack::LARGE_EXPLOSION );
531531 ResourcePack::EXPLOSION_OFFSET = (*i)[" explosionOffset" ].as <int >(ResourcePack::EXPLOSION_OFFSET );
532+ ResourcePack::SMOKE_OFFSET = (*i)[" smokeOffset" ].as <int >(ResourcePack::SMOKE_OFFSET );
533+ ResourcePack::UNDERWATER_SMOKE_OFFSET = (*i)[" underwaterSmokeOffset" ].as <int >(ResourcePack::UNDERWATER_SMOKE_OFFSET );
532534 ResourcePack::ITEM_DROP = (*i)[" itemDrop" ].as <int >(ResourcePack::ITEM_DROP );
533535 ResourcePack::ITEM_THROW = (*i)[" itemThrow" ].as <int >(ResourcePack::ITEM_THROW );
534536 ResourcePack::ITEM_RELOAD = (*i)[" itemReload" ].as <int >(ResourcePack::ITEM_RELOAD );
You can’t perform that action at this time.
0 commit comments