summaryrefslogtreecommitdiffstats
path: root/src/Generating/PieceStructuresGen.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-08 17:39:43 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-03-18 00:44:42 +0100
commit5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c (patch)
treeea5f79ad71456dcbf4f658a61cc259ac4e6e7d79 /src/Generating/PieceStructuresGen.cpp
parentAdd heraldry names to banner pattern API docs (diff)
downloadcuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.gz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.bz2
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.lz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.xz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.zst
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.zip
Diffstat (limited to 'src/Generating/PieceStructuresGen.cpp')
-rw-r--r--src/Generating/PieceStructuresGen.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/Generating/PieceStructuresGen.cpp b/src/Generating/PieceStructuresGen.cpp
index dbfe16b47..56890597a 100644
--- a/src/Generating/PieceStructuresGen.cpp
+++ b/src/Generating/PieceStructuresGen.cpp
@@ -20,10 +20,10 @@ class cPieceStructuresGen::cGen:
public:
- cGen(int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainHeightGenPtr a_HeightGen, int a_SeaLevel, const AString & a_Name):
+ cGen(int a_Seed, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_SeaLevel, const AString & a_Name):
Super(a_Seed),
- m_BiomeGen(std::move(a_BiomeGen)),
- m_HeightGen(std::move(a_HeightGen)),
+ m_BiomeGen(a_BiomeGen),
+ m_HeightGen(a_HeightGen),
m_SeaLevel(a_SeaLevel),
m_Name(a_Name),
m_MaxDepth(5)
@@ -95,10 +95,10 @@ protected:
typedef std::vector<cFreeConnector> cFreeConnectors;
/** The underlying biome generator that defines whether the structure is created or not */
- cBiomeGenPtr m_BiomeGen;
+ cBiomeGen & m_BiomeGen;
/** The underlying height generator, used to position the prefabs crossing chunk borders if they are set to FitGround. */
- cTerrainHeightGenPtr m_HeightGen;
+ cTerrainHeightGen & m_HeightGen;
/** The world's sea level, if available. Used for some cVerticalStrategy descendants. */
int m_SeaLevel;
@@ -129,7 +129,7 @@ cPieceStructuresGen::cPieceStructuresGen(int a_Seed):
-bool cPieceStructuresGen::Initialize(const AString & a_Prefabs, int a_SeaLevel, const cBiomeGenPtr & a_BiomeGen, const cTerrainHeightGenPtr & a_HeightGen)
+bool cPieceStructuresGen::Initialize(const AString & a_Prefabs, int a_SeaLevel, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen)
{
// Load each piecepool:
auto Structures = StringSplitAndTrim(a_Prefabs, "|");
@@ -172,8 +172,3 @@ void cPieceStructuresGen::GenFinish(cChunkDesc & a_Chunk)
Gen->GenFinish(a_Chunk);
}
}
-
-
-
-
-