Merge remote-tracking branch 'minetest/master'
This commit is contained in:
commit
b61b9a1c50
@ -162,9 +162,9 @@ static bool isOccluded(Map *map, v3s16 p0, v3s16 p1, float step, float stepfac,
|
||||
if (cache)
|
||||
occlude_cache[p] = is_transparent;
|
||||
if(!is_transparent){
|
||||
if(count == needed_count)
|
||||
return true;
|
||||
count++;
|
||||
if(count >= needed_count)
|
||||
return true;
|
||||
}
|
||||
step *= stepfac;
|
||||
}
|
||||
|
@ -525,22 +525,24 @@ EmergeAction EmergeThread::getBlockOrStartGen(
|
||||
// 1). Attempt to fetch block from memory
|
||||
*block = m_map->getBlockNoCreateNoEx(pos, false, true);
|
||||
}
|
||||
if (*block && !(*block)->isDummy() && (*block)->isGenerated())
|
||||
return EMERGE_FROM_MEMORY;
|
||||
|
||||
{
|
||||
MAP_NOTHREAD_LOCK(m_map);
|
||||
// 2). Attempt to load block from disk
|
||||
*block = m_map->loadBlock(pos);
|
||||
if (*block && !(*block)->isDummy()) {
|
||||
if ((*block)->isGenerated())
|
||||
return EMERGE_FROM_MEMORY;
|
||||
}
|
||||
|
||||
if (*block && (*block)->isGenerated())
|
||||
{
|
||||
MAP_NOTHREAD_LOCK(m_map);
|
||||
m_map->prepareBlock(*block);
|
||||
return EMERGE_FROM_DISK;
|
||||
// 2). Attempt to load block from disk if it was not in the memory
|
||||
*block = m_map->loadBlock(pos);
|
||||
}
|
||||
|
||||
if (*block && (*block)->isGenerated())
|
||||
{
|
||||
MAP_NOTHREAD_LOCK(m_map);
|
||||
m_map->prepareBlock(*block);
|
||||
return EMERGE_FROM_DISK;
|
||||
}
|
||||
|
||||
{
|
||||
MAP_NOTHREAD_LOCK(m_map);
|
||||
// 3). Attempt to start generation
|
||||
|
Loading…
x
Reference in New Issue
Block a user