mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Detect air-only blocks instead of day/night differences (#14264)
* Detect air-only blocks instead day/night differences * Write !is_air into the former day-night-diff bit on disk, so that old server can still read maps written by new servers * Only set is_air bit when reading from disk
This commit is contained in:
parent
0d30a3071a
commit
0d4b489545
5 changed files with 52 additions and 75 deletions
|
@ -354,18 +354,12 @@ void RemoteClient::GetNextBlocks (
|
|||
continue;
|
||||
|
||||
/*
|
||||
If block is not close, don't send it unless it is near
|
||||
ground level.
|
||||
|
||||
Block is near ground level if night-time mesh
|
||||
differs from day-time mesh.
|
||||
If block is not close, don't send it if it
|
||||
consists of air only.
|
||||
*/
|
||||
if (d >= d_opt) {
|
||||
if (!block->getIsUnderground() && !block->getDayNightDiff())
|
||||
if (d >= d_opt && block->isAir())
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Check occlusion cache first.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue