Fix spaces float islands code

This commit is contained in:
proller 2013-11-10 18:24:45 +04:00
parent a92e90f684
commit d75b1718f8
1 changed files with 39 additions and 44 deletions

View File

@ -348,10 +348,10 @@ void MapgenIndev::generateFloatIslands(int min_y) {
if (node_min.Y < min_y) return;
PseudoRandom pr(blockseed + 985);
// originally from http://forum.minetest.net/viewtopic.php?id=4776
float RAR = 0.8 * farscale(0.4, node_min.Y); // 0.4; // Island rarity.
float RAR = 0.8 * farscale(0.4, node_min.Y); // 0.4; // Island rarity in chunk layer. -0.4 = thick layer with holes, 0 = 50%, 0.4 = desert rarity, 0.7 = very rare.
float AMPY = 24; // 24; // Amplitude of island centre y variation.
float TGRAD = 24; // 24; // Noise gradient to create top surface.
float BGRAD = 24; // 24; // Noise gradient to create bottom surface.
float TGRAD = 24; // 24; // Noise gradient to create top surface. Tallness of island top.
float BGRAD = 24; // 24; // Noise gradient to create bottom surface. Tallness of island bottom.
v3s16 p0(node_min.X, node_min.Y, node_min.Z);
MapNode n1(c_stone);
@ -363,11 +363,8 @@ void MapgenIndev::generateFloatIslands(int min_y) {
float midy = node_min.Y + yl * 0.5;
u32 index = 0;
for (int z1 = 0; z1 <= zl; ++z1)
{
for (int y1 = 0; y1 <= yl; ++y1)
{
for (int x1 = 0; x1 <= xl; ++x1, ++index)
{
for (int x1 = 0; x1 <= xl; ++x1, ++index) {
int y = y1 + node_min.Y;
u32 index2d = z1 * zstride + x1;
float noise3 = noiseindev_float_islands3->result[index2d];
@ -390,8 +387,6 @@ void MapgenIndev::generateFloatIslands(int min_y) {
}
}
}
}
}
void MapgenIndev::generateExperimental() {
int float_islands = g_settings->getS16("mgindev_float_islands");