Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Aug 25, 2024
1 parent 94ef16c commit 06056db
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/defaultsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void fm_set_default_settings(Settings *settings) {
#endif

#ifdef __EMSCRIPTEN__
settings->setDefault("viewing_range", "500");
settings->setDefault("viewing_range", "100");
settings->setDefault("client_mesh_chunk", "4");
#endif

Expand Down
14 changes: 13 additions & 1 deletion src/fm_clientiface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,21 @@ int RemoteClient::GetNextBlocks(ServerEnvironment *env, EmergeManager *emerge,
// bool surely_not_found_on_disk = false;
// bool block_is_invalid = false;
if (block) {

if (d > 2 && block->content_only == CONTENT_AIR) {
uint8_t not_air = 0;
for (const auto &dir : g_6dirs) {
if (const auto *block_near =
env->getMap().getBlockNoCreateNoEx(p + dir)) {
if (block_near->content_only &&
block_near->content_only != CONTENT_AIR) {
++not_air;
break;
}
}
}
if (!not_air) {
continue;
}
}

if (block_sent > 0 && block_sent >= block->m_changed_timestamp) {
Expand Down

0 comments on commit 06056db

Please sign in to comment.