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

MeshMakeData: Explain members, and add grid size and minimap flag

This commit is contained in:
Desour 2025-01-08 10:01:13 +01:00 committed by DS
parent c0ce918d77
commit d044c27b5f
6 changed files with 49 additions and 35 deletions

View file

@ -177,7 +177,8 @@ void MeshUpdateQueue::done(v3s16 pos)
void MeshUpdateQueue::fillDataFromMapBlocks(QueuedMeshUpdate *q)
{
auto mesh_grid = m_client->getMeshGrid();
MeshMakeData *data = new MeshMakeData(m_client->ndef(), MAP_BLOCKSIZE * mesh_grid.cell_size);
MeshMakeData *data = new MeshMakeData(m_client->ndef(),
MAP_BLOCKSIZE * mesh_grid.cell_size, mesh_grid);
q->data = data;
data->fillBlockDataBegin(q->p);
@ -192,6 +193,7 @@ void MeshUpdateQueue::fillDataFromMapBlocks(QueuedMeshUpdate *q)
}
data->setCrack(q->crack_level, q->crack_pos);
data->m_generate_minimap = !!m_client->getMinimap();
data->m_smooth_lighting = m_cache_smooth_lighting;
data->m_enable_water_reflections = m_cache_enable_water_reflections;
}