void VoxelManipulator::addArea(const VoxelArea &area)
{
// Cancel if requested area has zero volume
- if(area.getExtent() == v3s16(0,0,0))
+ if (area.hasEmptyExtent())
return;
// Cancel if m_area already contains the requested area
// Calculate new area
VoxelArea new_area;
// New area is the requested area if m_area has zero volume
- if(m_area.getExtent() == v3s16(0,0,0))
+ if(m_area.hasEmptyExtent())
{
new_area = area;
}
dstream<<", new_size="<<new_size;
dstream<<std::endl;*/
- // Allocate and clear new data
- // FIXME: UGLY KLUDGE because MapNode default constructor is FUBAR; it
- // initialises data that is going to be overwritten anyway
- MapNode *new_data = (MapNode*)new char[new_size * sizeof (*new_data)];
+ // Allocate new data and clear flags
+ MapNode *new_data = new MapNode[new_size];
assert(new_data);
u8 *new_flags = new u8[new_size];
assert(new_flags);
}
#endif
+const MapNode VoxelManipulator::ContentIgnoreNode = MapNode(CONTENT_IGNORE);
+
#if 1
/*
Lights neighbors of from_nodes, collects all them and then