1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Soft node overlay (#5186)

This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
This commit is contained in:
Dániel Juhász 2017-04-21 15:34:59 +02:00 committed by Zeno-
parent 2ad74a9e8b
commit 1ffb180868
18 changed files with 763 additions and 467 deletions

View file

@ -487,13 +487,17 @@ void Client::step(float dtime)
minimap_mapblock = r.mesh->moveMinimapMapblock();
if (minimap_mapblock == NULL)
do_mapper_update = false;
}
if (r.mesh && r.mesh->getMesh()->getMeshBufferCount() == 0) {
delete r.mesh;
} else {
// Replace with the new mesh
block->mesh = r.mesh;
bool is_empty = true;
for (int l = 0; l < MAX_TILE_LAYERS; l++)
if (r.mesh->getMesh(l)->getMeshBufferCount() != 0)
is_empty = false;
if (is_empty)
delete r.mesh;
else
// Replace with the new mesh
block->mesh = r.mesh;
}
} else {
delete r.mesh;