mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-16 06:15:06 -05:00
Fix most walled-off caves
This commit is contained in:
parent
60e6284f30
commit
5bd50a2d90
23
src/map.cpp
23
src/map.cpp
@ -2240,7 +2240,7 @@ bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ensure none of the blocks to be generated were marked as containing CONTENT_IGNORE
|
// 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 y = blockpos_min.Y; y <= blockpos_max.Y; y++) {
|
||||||
for (s16 x = blockpos_min.X; x <= blockpos_max.X; x++) {
|
for (s16 x = blockpos_min.X; x <= blockpos_max.X; x++) {
|
||||||
core::map<v3s16, u8>::Node *n;
|
core::map<v3s16, u8>::Node *n;
|
||||||
@ -2252,7 +2252,7 @@ bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
|
|||||||
n->setValue(flags);
|
n->setValue(flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Data is ready now.
|
// Data is ready now.
|
||||||
return true;
|
return true;
|
||||||
@ -3715,11 +3715,11 @@ void MapVoxelManipulator::emerge(VoxelArea a, s32 caller_id)
|
|||||||
memset(&m_flags[i], VOXELFLAG_INEXISTENT, MAP_BLOCKSIZE);
|
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
|
// Mark that block was loaded as blank
|
||||||
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
|
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
m_loaded_blocks.insert(p, flags);
|
m_loaded_blocks.insert(p, flags);
|
||||||
}
|
}
|
||||||
@ -3881,11 +3881,11 @@ void ManualMapVoxelManipulator::initialEmerge(
|
|||||||
memset(&m_flags[i], VOXELFLAG_INEXISTENT, MAP_BLOCKSIZE);
|
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
|
// Mark that block was loaded as blank
|
||||||
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
|
flags |= VMANIP_BLOCK_CONTAINS_CIGNORE;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
m_loaded_blocks.insert(p, flags);
|
m_loaded_blocks.insert(p, flags);
|
||||||
}
|
}
|
||||||
@ -3927,13 +3927,10 @@ void ManualMapVoxelManipulator::blitBackAll(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool no_content_ignore = !(flags & VMANIP_BLOCK_CONTAINS_CIGNORE);
|
block->copyFrom(*this);
|
||||||
if (no_content_ignore)
|
|
||||||
{
|
if(modified_blocks)
|
||||||
block->copyFrom(*this);
|
modified_blocks->insert(p, block);
|
||||||
if(modified_blocks)
|
|
||||||
modified_blocks->insert(p, block);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define THREAD_PRIORITY_BELOW_NORMAL 1
|
#define THREAD_PRIORITY_BELOW_NORMAL 1
|
||||||
#define THREAD_PRIORITY_NORMAL 2
|
#define THREAD_PRIORITY_NORMAL 2
|
||||||
#define THREAD_PRIORITY_ABOVE_NORMAL 3
|
#define THREAD_PRIORITY_ABOVE_NORMAL 3
|
||||||
#define THREAD_PRIORITY_HIGHEST 4
|
#define THREAD_PRIORITY_HIGHEST 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -244,7 +244,13 @@ void VoxelManipulator::copyTo(MapNode *dst, VoxelArea dst_area,
|
|||||||
{
|
{
|
||||||
s32 i_dst = dst_area.index(dst_pos.X, dst_pos.Y+y, dst_pos.Z+z);
|
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);
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user