}
// Ensure none of the blocks to be generated were marked as containing CONTENT_IGNORE
- for (s16 z = blockpos_min.Z; z <= blockpos_max.Z; z++) {
+/* for (s16 z = blockpos_min.Z; z <= blockpos_max.Z; z++) {
for (s16 y = blockpos_min.Y; y <= blockpos_max.Y; y++) {
for (s16 x = blockpos_min.X; x <= blockpos_max.X; x++) {
core::map<v3s16, u8>::Node *n;
n->setValue(flags);
}
}
- }
+ }*/
// Data is ready now.
return true;
memset(&m_flags[i], VOXELFLAG_INEXISTENT, MAP_BLOCKSIZE);
}
}
- else if (block->getNode(0, 0, 0).getContent() == CONTENT_IGNORE)
+ /*else if (block->getNode(0, 0, 0).getContent() == CONTENT_IGNORE)
{
// Mark that block was loaded as blank
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
- }
+ }*/
m_loaded_blocks.insert(p, flags);
}
memset(&m_flags[i], VOXELFLAG_INEXISTENT, MAP_BLOCKSIZE);
}
}
- else if (block->getNode(0, 0, 0).getContent() == CONTENT_IGNORE)
+ /*else if (block->getNode(0, 0, 0).getContent() == CONTENT_IGNORE)
{
// Mark that block was loaded as blank
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
- }
+ }*/
m_loaded_blocks.insert(p, flags);
}
continue;
}
- bool no_content_ignore = !(flags & VMANIP_BLOCK_CONTAINS_CIGNORE);
- if (no_content_ignore)
- {
- block->copyFrom(*this);
- if(modified_blocks)
- modified_blocks->insert(p, block);
- }
+ block->copyFrom(*this);
+
+ if(modified_blocks)
+ modified_blocks->insert(p, block);
}
}
{
s32 i_dst = dst_area.index(dst_pos.X, dst_pos.Y+y, dst_pos.Z+z);
s32 i_local = m_area.index(from_pos.X, from_pos.Y+y, from_pos.Z+z);
- memcpy(&dst[i_dst], &m_data[i_local], size.X*sizeof(MapNode));
+ for (s16 x = 0; x < size.X; x++) {
+ if (m_data[i_local].getContent() != CONTENT_IGNORE)
+ dst[i_dst] = m_data[i_local];
+ i_dst++;
+ i_local++;
+ }
+ //memcpy(&dst[i_dst], &m_data[i_local], size.X*sizeof(MapNode));
}
}