summaryrefslogtreecommitdiffstats
path: root/source/Generating/DistortedHeightmap.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-06 09:59:59 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-06 09:59:59 +0200
commit27d0e01160e3ec04460c20eb9e0682a1bb88e270 (patch)
tree80e81abb39449ea4ddc85cae2e5f85bf44a297af /source/Generating/DistortedHeightmap.h
parentRe-worked generator subobject ownership, added a cache for the CompositionGen (diff)
downloadcuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar.gz
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar.bz2
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar.lz
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar.xz
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.tar.zst
cuberite-27d0e01160e3ec04460c20eb9e0682a1bb88e270.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/DistortedHeightmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/Generating/DistortedHeightmap.h b/source/Generating/DistortedHeightmap.h
index 8c1b136b8..65ec70a6d 100644
--- a/source/Generating/DistortedHeightmap.h
+++ b/source/Generating/DistortedHeightmap.h
@@ -55,6 +55,9 @@ protected:
cBiomeGen & m_BiomeGen;
cHeiGenCache m_HeightGen; // This generator provides us with base heightmap (before distortion)
+ /// Heightmap for the current chunk, before distortion (from m_HeightGen). Used for optimization.
+ cChunkDef::HeightMap m_CurChunkHeights;
+
// Per-biome terrain generator parameters:
struct sGenParam
{
@@ -85,6 +88,7 @@ protected:
/// Calculates the X and Z distortion amplitudes based on the neighbors' biomes
void GetDistortAmpsAt(BiomeNeighbors & a_Neighbors, int a_RelX, int a_RelZ, NOISE_DATATYPE & a_DistortAmpX, NOISE_DATATYPE & a_DistortAmpZ);
+
// cTerrainHeightGen overrides:
virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;