diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-08 17:39:43 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-18 00:44:42 +0100 |
commit | 5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c (patch) | |
tree | ea5f79ad71456dcbf4f658a61cc259ac4e6e7d79 /src/Generating/DungeonRoomsFinisher.cpp | |
parent | Add heraldry names to banner pattern API docs (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Generating/DungeonRoomsFinisher.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Generating/DungeonRoomsFinisher.cpp b/src/Generating/DungeonRoomsFinisher.cpp index 4196e16ee..96dd28333 100644 --- a/src/Generating/DungeonRoomsFinisher.cpp +++ b/src/Generating/DungeonRoomsFinisher.cpp @@ -287,9 +287,9 @@ protected: //////////////////////////////////////////////////////////////////////////////// // cDungeonRoomsFinisher: -cDungeonRoomsFinisher::cDungeonRoomsFinisher(cTerrainShapeGenPtr a_ShapeGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString & a_HeightDistrib) : +cDungeonRoomsFinisher::cDungeonRoomsFinisher(cTerrainShapeGen & a_ShapeGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString & a_HeightDistrib) : Super(a_Seed + 100, a_GridSize, a_GridSize, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 1024), - m_ShapeGen(std::move(a_ShapeGen)), + m_ShapeGen(a_ShapeGen), m_MaxHalfSize((a_MaxSize + 1) / 2), m_MinHalfSize((a_MinSize + 1) / 2), m_HeightProbability(cChunkDef::Height) @@ -322,7 +322,7 @@ cDungeonRoomsFinisher::cStructurePtr cDungeonRoomsFinisher::CreateStructure(int int RelX = a_OriginX, RelY = 0, RelZ = a_OriginZ; cChunkDef::AbsoluteToRelative(RelX, RelY, RelZ, ChunkX, ChunkZ); cChunkDesc::Shape shape; - m_ShapeGen->GenShape({ChunkX, ChunkZ}, shape); + m_ShapeGen.GenShape({ChunkX, ChunkZ}, shape); int height = 0; int idx = RelX * 256 + RelZ * 16 * 256; for (int y = 6; y < cChunkDef::Height; y++) @@ -337,7 +337,3 @@ cDungeonRoomsFinisher::cStructurePtr cDungeonRoomsFinisher::CreateStructure(int // Create the dungeon room descriptor: return cStructurePtr(new cDungeonRoom(a_GridX, a_GridZ, a_OriginX, a_OriginZ, HalfSizeX, HalfSizeZ, height, m_Noise)); } - - - - |