diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-27 18:47:55 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-27 18:47:55 +0200 |
commit | b521456a01fbb89a48677109b0473968f82f2dbc (patch) | |
tree | a83ba90c51aff1c5453d8f78384bf7fc5a8a49da /source/Caves.h | |
parent | Fixed a possible crash in Ravines. (diff) | |
download | cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar.gz cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar.bz2 cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar.lz cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar.xz cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.tar.zst cuberite-b521456a01fbb89a48677109b0473968f82f2dbc.zip |
Diffstat (limited to 'source/Caves.h')
-rw-r--r-- | source/Caves.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/Caves.h b/source/Caves.h index ec3ecdf0f..8af9974fe 100644 --- a/source/Caves.h +++ b/source/Caves.h @@ -78,9 +78,11 @@ class cStructGenWormNestCaves : public cStructureGen
{
public:
- cStructGenWormNestCaves(int a_Seed, int a_Size = 128) :
+ cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) :
m_Noise(a_Seed),
- m_Size(128)
+ m_Size(a_Size),
+ m_Grid(a_Grid),
+ m_MaxOffset(a_MaxOffset)
{
}
@@ -88,17 +90,19 @@ public: protected:
class cCaveSystem; // fwd: Caves.cpp
- typedef std::list<cCaveSystem *> cCaves;
+ typedef std::list<cCaveSystem *> cCaveSystems;
- cNoise m_Noise;
- int m_Size; // relative size, in blocks, of the nests produced. Also used for spacing.
- cCaves m_Cache;
+ cNoise m_Noise;
+ int m_Size; // relative size of the cave systems' caves. Average number of blocks of each initial tunnel
+ int m_MaxOffset; // maximum offset of the cave nest origin from the grid cell the nest belongs to
+ int m_Grid; // average spacing of the nests
+ cCaveSystems m_Cache;
/// Clears everything from the cache
void ClearCache(void);
/// Returns all caves that *may* intersect the given chunk. All the caves are valid until the next call to this function.
- void GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cCaves & a_Caves);
+ void GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cCaveSystems & a_Caves);
// cStructGen override:
virtual void GenStructures(
|