1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add VoxelArea::hasEmptyExtent

This commit is contained in:
unknown 2015-01-13 23:23:31 +10:00 committed by Craig Robbins
parent c0066a75cd
commit 5d08ada224
2 changed files with 14 additions and 5 deletions

View file

@ -139,7 +139,7 @@ void VoxelManipulator::print(std::ostream &o, INodeDefManager *ndef,
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
@ -151,7 +151,7 @@ void VoxelManipulator::addArea(const VoxelArea &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;
}