summaryrefslogtreecommitdiffstats
path: root/src/Generating/PrefabStructure.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/PrefabStructure.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Generating/PrefabStructure.cpp b/src/Generating/PrefabStructure.cpp
index 127cd0018..9814610b4 100644
--- a/src/Generating/PrefabStructure.cpp
+++ b/src/Generating/PrefabStructure.cpp
@@ -15,11 +15,11 @@ cPrefabStructure::cPrefabStructure(
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
cPlacedPieces && a_Pieces,
- cTerrainHeightGenPtr a_HeightGen
+ cTerrainHeightGen & a_HeightGen
):
Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Pieces(std::move(a_Pieces)),
- m_HeightGen(std::move(a_HeightGen))
+ m_HeightGen(a_HeightGen)
{
}
@@ -55,11 +55,7 @@ void cPrefabStructure::PlacePieceOnGround(cPlacedPiece & a_Piece)
int BlockY;
cChunkDef::AbsoluteToRelative(BlockX, BlockY, BlockZ, ChunkX, ChunkZ);
cChunkDef::HeightMap HeightMap;
- m_HeightGen->GenHeightMap({ChunkX, ChunkZ}, HeightMap);
+ m_HeightGen.GenHeightMap({ChunkX, ChunkZ}, HeightMap);
int TerrainHeight = cChunkDef::GetHeight(HeightMap, BlockX, BlockZ);
a_Piece.MoveToGroundBy(TerrainHeight - FirstConnector.m_Pos.y + 1);
}
-
-
-
-