From: Perttu Ahola Date: Wed, 28 Mar 2012 23:23:59 +0000 (+0300) Subject: Generate blobs of dirt and gravel in stone X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=d376148ca1ca05d80936641b22459a3ebbe0a901;p=zefram%2Fminetest%2Fminetest_engine.git Generate blobs of dirt and gravel in stone --- diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 61718d91..ceef9c61 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1345,8 +1345,7 @@ void make_block(BlockMakeData *data) /* Create a block-specific seed */ - /*u32 blockseed = (u32)(data->seed%0x100000000ULL) + full_node_min.Z*38134234 - + full_node_min.Y*42123 + full_node_min.X*23;*/ + u32 blockseed = get_blockseed(data->seed, full_node_min); /* Cache some ground type values for speed @@ -1444,6 +1443,42 @@ void make_block(BlockMakeData *data) #endif }//timer1 + + /* + Add blobs of dirt and gravel underground + */ + { + PseudoRandom pr(blockseed+983); + for(int i=0; i -32 && pr.range(0,1) == 0) + n1 = MapNode(c_dirt); + else + n1 = MapNode(c_gravel); + for(int x1=0; x1