forked from Mirrorlandia_minetest/minetest
master #7
@ -1579,11 +1579,11 @@ MapBlock * ServerMap::emergeBlock(v3s16 p, bool create_blank)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
MapBlock *ServerMap::getBlockOrEmerge(v3s16 p3d)
|
MapBlock *ServerMap::getBlockOrEmerge(v3s16 p3d, bool generate)
|
||||||
{
|
{
|
||||||
MapBlock *block = getBlockNoCreateNoEx(p3d);
|
MapBlock *block = getBlockNoCreateNoEx(p3d);
|
||||||
if (block == NULL)
|
if (block == NULL)
|
||||||
m_emerge->enqueueBlockEmerge(PEER_ID_INEXISTENT, p3d, false);
|
m_emerge->enqueueBlockEmerge(PEER_ID_INEXISTENT, p3d, generate);
|
||||||
|
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,7 @@ public:
|
|||||||
- Memory
|
- Memory
|
||||||
- Emerge Queue (deferred disk or generate)
|
- Emerge Queue (deferred disk or generate)
|
||||||
*/
|
*/
|
||||||
MapBlock *getBlockOrEmerge(v3s16 p3d);
|
MapBlock *getBlockOrEmerge(v3s16 p3d, bool generate);
|
||||||
|
|
||||||
bool isBlockInQueue(v3s16 pos);
|
bool isBlockInQueue(v3s16 pos);
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ void ServerEnvironment::step(float dtime)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
for (const v3s16 &p: blocks_added) {
|
for (const v3s16 &p: blocks_added) {
|
||||||
MapBlock *block = m_map->getBlockOrEmerge(p);
|
MapBlock *block = m_map->getBlockOrEmerge(p, true);
|
||||||
if (!block) {
|
if (!block) {
|
||||||
// TODO: The blocks removed here will only be picked up again
|
// TODO: The blocks removed here will only be picked up again
|
||||||
// on the next cycle. To minimize the latency of objects being
|
// on the next cycle. To minimize the latency of objects being
|
||||||
|
Loading…
Reference in New Issue
Block a user