diff options
author | madmaxoft <github@xoft.cz> | 2014-08-04 13:20:16 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-08-04 13:20:29 +0200 |
commit | 7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a (patch) | |
tree | 31ce509c35c190aab82c86b3252f59b8acc74355 /src/Generating | |
parent | BasicStyleCheck: Dividers are exactly 80 slashes. (diff) | |
download | cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar.gz cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar.bz2 cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar.lz cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar.xz cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.tar.zst cuberite-7bfb0b05d0514c47095ba3ec8ebb6a1073d9962a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/Noise3DGenerator.cpp | 5 | ||||
-rw-r--r-- | src/Generating/StructGen.cpp | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Generating/Noise3DGenerator.cpp b/src/Generating/Noise3DGenerator.cpp index b879349ee..eb816f564 100644 --- a/src/Generating/Noise3DGenerator.cpp +++ b/src/Generating/Noise3DGenerator.cpp @@ -412,11 +412,12 @@ void cNoise3DComposable::GenerateNoiseArrayIfNeeded(int a_ChunkX, int a_ChunkZ) for (int x = 0; x < 17; x += UPSCALE_X) { NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(a_ChunkX * cChunkDef::Width + x)) / m_FrequencyX; - CurFloor[x + 17 * z] = + CurFloor[x + 17 * z] = ( m_Noise1.CubicNoise3D(NoiseX, NoiseY, NoiseZ) * (NOISE_DATATYPE)0.5 + m_Noise2.CubicNoise3D(NoiseX / 2, NoiseY / 2, NoiseZ / 2) + m_Noise3.CubicNoise3D(NoiseX / 4, NoiseY / 4, NoiseZ / 4) * 2 + - AddHeight / Height[x + 17 * z]; + AddHeight / Height[x + 17 * z] + ); } } // Linear-interpolate this XZ floor: diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp index 054eec345..f7e609353 100644 --- a/src/Generating/StructGen.cpp +++ b/src/Generating/StructGen.cpp @@ -585,10 +585,10 @@ void cStructGenDirectOverhangs::GenFinish(cChunkDesc & a_ChunkDesc) // First update the high floor: for (int z = 0; z <= 16 / INTERPOL_Z; z++) for (int x = 0; x <= 16 / INTERPOL_X; x++) { - FloorHi[INTERPOL_X * x + 17 * INTERPOL_Z * z] = + FloorHi[INTERPOL_X * x + 17 * INTERPOL_Z * z] = ( m_Noise1.IntNoise3DInt(BaseX + INTERPOL_X * x, Segment + SEGMENT_HEIGHT, BaseZ + INTERPOL_Z * z) * - m_Noise2.IntNoise3DInt(BaseX + INTERPOL_Z * x, Segment + SEGMENT_HEIGHT, BaseZ + INTERPOL_Z * z) / - 256; + m_Noise2.IntNoise3DInt(BaseX + INTERPOL_Z * x, Segment + SEGMENT_HEIGHT, BaseZ + INTERPOL_Z * z) / 256 + ); } // for x, z - FloorLo[] LinearUpscale2DArrayInPlace<17, 17, INTERPOL_X, INTERPOL_Z>(FloorHi); |