From ce955f37ba9f431122ca3c46e5a7dac63ffd65ea Mon Sep 17 00:00:00 2001 From: kwolekr Date: Mon, 8 Jul 2013 15:19:22 -0400 Subject: Decoration: Handle facedir and wallmounted param2types with schematic rotation --- src/mapgen.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mapgen.cpp') diff --git a/src/mapgen.cpp b/src/mapgen.cpp index fe1cfb3a4..6bc487331 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -237,6 +237,8 @@ Decoration::~Decoration() { void Decoration::resolveNodeNames(INodeDefManager *ndef) { + this->ndef = ndef; + if (c_place_on == CONTENT_IGNORE) c_place_on = ndef->getId(place_on_name); } @@ -553,7 +555,7 @@ std::string DecoSchematic::getName() { void DecoSchematic::blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm, - int rot, bool force_placement) { + Rotation rot, bool force_placement) { int xstride = 1; int ystride = size.X; int zstride = size.X * size.Y; @@ -594,7 +596,7 @@ void DecoSchematic::blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm, u32 vi = vm->m_area.index(p.X + x, p.Y + y, p.Z + z); if (!vm->m_area.contains(vi)) continue; - + if (schematic[i].getContent() == CONTENT_IGNORE) continue; @@ -609,6 +611,9 @@ void DecoSchematic::blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm, vm->m_data[vi] = schematic[i]; vm->m_data[vi].param1 = 0; + + if (rot) + vm->m_data[vi].rotateAlongYAxis(ndef, rot); } } } -- cgit v1.2.3