1
0
Fork 0
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:
sfan5 2025-06-23 12:30:44 +02:00
parent 0ea89d4112
commit 6545710c8e
6 changed files with 95 additions and 61 deletions

View file

@ -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