diff options
author | Mattes D <github@xoft.cz> | 2020-04-13 18:38:06 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-16 22:07:48 +0200 |
commit | 9ee47e59995f858ec531b3ee467f131594e4ba1f (patch) | |
tree | f005d8af4a0362d7eab8a96a71aca0d73275f8e1 /src/Generating/VillageGen.cpp | |
parent | Prevent crash when breeding (diff) | |
download | cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.gz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.bz2 cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.lz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.xz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.zst cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/VillageGen.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp index 340d9adb8..21d6e30d4 100644 --- a/src/Generating/VillageGen.cpp +++ b/src/Generating/VillageGen.cpp @@ -37,16 +37,18 @@ per-village density setting, the cVillage class itself implements the cPiecePool calls to the underlying cVillagePiecePool, after processing the density check. */ -class cVillagePiecePool : +class cVillagePiecePool: public cPrefabPiecePool { - typedef cPrefabPiecePool super; + using Super = cPrefabPiecePool; + public: + cVillagePiecePool( const cPrefab::sDef * a_PieceDefs, size_t a_NumPieceDefs, const cPrefab::sDef * a_StartingPieceDefs, size_t a_NumStartingPieceDefs - ) : - super(a_PieceDefs, a_NumPieceDefs, a_StartingPieceDefs, a_NumStartingPieceDefs) + ): + Super(a_PieceDefs, a_NumPieceDefs, a_StartingPieceDefs, a_NumStartingPieceDefs) { AddRoadPieces(); } @@ -107,13 +109,14 @@ public: -class cVillageGen::cVillage : +class cVillageGen::cVillage: public cGridStructGen::cStructure, protected cPiecePool { - typedef cGridStructGen::cStructure super; + using Super = cGridStructGen::cStructure; public: + cVillage( int a_Seed, int a_GridX, int a_GridZ, @@ -123,8 +126,8 @@ public: int a_Density, cVillagePiecePool & a_Prefabs, cTerrainHeightGenPtr a_HeightGen - ) : - super(a_GridX, a_GridZ, a_OriginX, a_OriginZ), + ): + Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ), m_Seed(a_Seed), m_Noise(a_Seed), m_MaxSize(a_MaxSize), @@ -339,7 +342,7 @@ cVillageGen::cVillageGen( int a_SeaLevel, const AStringVector & a_PrefabsToLoad ) : - super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100), + Super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100), m_RandNoise(a_Seed + 1000), m_MaxDepth(a_MaxDepth), m_MaxSize(a_MaxSize), |