summaryrefslogtreecommitdiffstats
path: root/src/Generating/Prefab.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-17 21:54:04 +0200
committermadmaxoft <github@xoft.cz>2014-05-17 21:54:04 +0200
commit7004043c6164c6b22346f94489cb823f9495738f (patch)
tree6aada4d3af59dbcb414b256b4d712cf9f203bf8a /src/Generating/Prefab.cpp
parentUpdated PlainsVillage prefabs to the latest Gallery contents. (diff)
downloadcuberite-7004043c6164c6b22346f94489cb823f9495738f.tar
cuberite-7004043c6164c6b22346f94489cb823f9495738f.tar.gz
cuberite-7004043c6164c6b22346f94489cb823f9495738f.tar.bz2
cuberite-7004043c6164c6b22346f94489cb823f9495738f.tar.lz
cuberite-7004043c6164c6b22346f94489cb823f9495738f.tar.xz
cuberite-7004043c6164c6b22346f94489cb823f9495738f.tar.zst
cuberite-7004043c6164c6b22346f94489cb823f9495738f.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/Prefab.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Generating/Prefab.cpp b/src/Generating/Prefab.cpp
index 9aef7a94b..506e1c2cc 100644
--- a/src/Generating/Prefab.cpp
+++ b/src/Generating/Prefab.cpp
@@ -192,12 +192,20 @@ void cPrefab::AddRotatedBlockAreas(void)
void cPrefab::Draw(cChunkDesc & a_Dest, const cPlacedPiece * a_Placement) const
{
+ Draw(a_Dest, a_Placement->GetCoords(), a_Placement->GetNumCCWRotations());
+}
+
+
+
+
+void cPrefab::Draw(cChunkDesc & a_Dest, const Vector3i & a_Placement, int a_NumRotations) const
+{
// Draw the basic image:
- Vector3i Placement = a_Placement->GetCoords();
+ Vector3i Placement(a_Placement);
int ChunkStartX = a_Dest.GetChunkX() * cChunkDef::Width;
int ChunkStartZ = a_Dest.GetChunkZ() * cChunkDef::Width;
Placement.Move(-ChunkStartX, 0, -ChunkStartZ);
- const cBlockArea & Image = m_BlockArea[a_Placement->GetNumCCWRotations()];
+ const cBlockArea & Image = m_BlockArea[a_NumRotations];
a_Dest.WriteBlockArea(Image, Placement.x, Placement.y, Placement.z, m_MergeStrategy);
// If requested, draw the floor (from the bottom of the prefab down to the nearest non-air)