1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 19:42:10 +00:00

Fix meaning of VoxelArea::hasEmptyExtent()

This commit is contained in:
sfan5 2024-12-06 21:03:52 +01:00
parent 8957739cdf
commit 67126cbd1b
3 changed files with 6 additions and 8 deletions

View file

@ -93,7 +93,7 @@ public:
MapEditEventAreaIgnorer(VoxelArea *ignorevariable, const VoxelArea &a):
m_ignorevariable(ignorevariable)
{
if (m_ignorevariable->getVolume() == 0)
if (m_ignorevariable->hasEmptyExtent())
*m_ignorevariable = a;
else
m_ignorevariable = nullptr;
@ -102,7 +102,7 @@ public:
~MapEditEventAreaIgnorer()
{
if (m_ignorevariable) {
assert(m_ignorevariable->getVolume() != 0);
assert(!m_ignorevariable->hasEmptyExtent());
*m_ignorevariable = VoxelArea();
}
}