mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Refactor meshgen-related code
This commit is contained in:
parent
0ea89d4112
commit
6545710c8e
6 changed files with 95 additions and 61 deletions
|
@ -612,12 +612,7 @@ void Client::step(float dtime)
|
|||
if (minimap_mapblocks.empty())
|
||||
do_mapper_update = false;
|
||||
|
||||
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) {
|
||||
if (r.mesh->isEmpty()) {
|
||||
delete r.mesh;
|
||||
} else {
|
||||
// Replace with the new mesh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue