diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-13 11:38:04 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-13 11:38:04 +0200 |
commit | 2b9d03b267a3a11e6fc81d94423caaa852616fa8 (patch) | |
tree | 5f7e7cd9b76965a22fa7089aa25d79412f55051b /src/map.cpp | |
parent | de83bfb81e3ec1fb9c0583f810a0ca8b9b6cd54f (diff) | |
download | minetest-2b9d03b267a3a11e6fc81d94423caaa852616fa8.tar.gz minetest-2b9d03b267a3a11e6fc81d94423caaa852616fa8.tar.bz2 minetest-2b9d03b267a3a11e6fc81d94423caaa852616fa8.zip |
random stuff and different node lighting
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp index ff57e8d90..8bc914cfd 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1961,9 +1961,10 @@ MapBlock * ServerMap::emergeBlock( Add some minerals */ - if(is_underground) + //if(is_underground) + if(some_part_underground) { - s16 underground_level = lowest_ground_y/MAP_BLOCKSIZE - block_y; + s16 underground_level = (lowest_ground_y/MAP_BLOCKSIZE - block_y)+1; for(s16 i=0; i<underground_level*3; i++) { if(rand()%2 == 0) @@ -1977,13 +1978,15 @@ MapBlock * ServerMap::emergeBlock( MapNode n; n.d = CONTENT_MESE; - if(is_ground_content(block->getNode(cp).d)) + //if(is_ground_content(block->getNode(cp).d)) + if(block->getNode(cp).d == CONTENT_STONE) if(rand()%8 == 0) block->setNode(cp, n); for(u16 i=0; i<26; i++) { - if(is_ground_content(block->getNode(cp+g_26dirs[i]).d)) + //if(is_ground_content(block->getNode(cp+g_26dirs[i]).d)) + if(block->getNode(cp+g_26dirs[i]).d == CONTENT_STONE) if(rand()%8 == 0) block->setNode(cp+g_26dirs[i], n); } |