mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
This commit is contained in:
parent
fe3ea090d1
commit
fbbdae93ee
@ -298,18 +298,19 @@ void RemoteClient::GetNextBlocks (
|
|||||||
Check if map has this block
|
Check if map has this block
|
||||||
*/
|
*/
|
||||||
MapBlock *block = env->getMap().getBlockNoCreateNoEx(p);
|
MapBlock *block = env->getMap().getBlockNoCreateNoEx(p);
|
||||||
|
if (block) {
|
||||||
|
// First: Reset usage timer, this block will be of use in the future.
|
||||||
|
block->resetUsageTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Don't send already sent blocks
|
||||||
|
*/
|
||||||
|
if (m_blocks_sent.find(p) != m_blocks_sent.end())
|
||||||
|
continue;
|
||||||
|
|
||||||
bool block_not_found = false;
|
bool block_not_found = false;
|
||||||
if (block) {
|
if (block) {
|
||||||
// Reset usage timer, this block will be of use in the future.
|
|
||||||
block->resetUsageTimer();
|
|
||||||
|
|
||||||
/*
|
|
||||||
Don't send already sent blocks
|
|
||||||
*/
|
|
||||||
if (m_blocks_sent.find(p) != m_blocks_sent.end())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Check whether the block exists (with data)
|
// Check whether the block exists (with data)
|
||||||
if (!block->isGenerated())
|
if (!block->isGenerated())
|
||||||
block_not_found = true;
|
block_not_found = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user