steepness, height_select);
}
+
float MapgenIndev::baseTerrainLevelFromMap(int index) {
if (flags & MG_FLAT)
return water_level;
steepness, height_select);
}
+
float MapgenIndev::getMudAmount(int index)
{
if (flags & MG_FLAT)
return noiseindev_mud->result[index];
}
+
void MapgenIndev::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave) {
cave.min_tunnel_diameter = 2;
cave.max_tunnel_diameter = ps.range(2,6);
cave.tunnel_routepoints = ps.range(10, ps.range(15,30));
}
cave.large_cave_is_flat = (ps.range(0,1) == 0);
-};
+}
}
}
-void MapgenV6::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave) {
+void MapgenV6::defineCave(Cave &cave, PseudoRandom ps,
+ v3s16 node_min, bool large_cave) {
cave.min_tunnel_diameter = 2;
cave.max_tunnel_diameter = ps.range(2,6);
cave.dswitchint = ps.range(1,14);
- //cave.tunnel_routepoints = 0;
- //cave.part_max_length_rs = 0;
- cave.flooded = large_cave && ps.range(0,4);
+ cave.flooded = true; //large_cave && ps.range(0,4);
if(large_cave){
cave.part_max_length_rs = ps.range(2,4);
cave.tunnel_routepoints = ps.range(5, ps.range(15,30));
cave.tunnel_routepoints = ps.range(10, ps.range(15,30));
}
cave.large_cave_is_flat = (ps.range(0,1) == 0);
-};
+}
+
void MapgenV6::generateCaves(int max_stone_y) {
// 24ms @cs=8
u32 get_blockseed(u64 seed, v3s16 p);
-
virtual void calculateNoise();
int generateGround();
void addMud();
void addDirtGravelBlobs();
void growGrass();
void placeTrees();
- virtual void defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave);
+ virtual void defineCave(Cave &cave, PseudoRandom ps,
+ v3s16 node_min, bool large_cave);
void generateCaves(int max_stone_y);
};
for (j = 0; j != sy; j++) {
for (i = 0; i != sx; i++) {
result[index] += g * buf[index];
-//dstream << "pm2d i="<<index<<" r="<< result[index]<<std::endl;
index++;
}
}