Meshgen: Don't get lights for not drawn solid faces

`drawCuboid()` doesn't call the face lighter function for masked
faces, so we don't need these values.
This is for performance.
This commit is contained in:
Desour 2024-08-25 10:21:50 +02:00 committed by sfan5
parent df8afe3dc4
commit da1fc9a536

View File

@ -463,6 +463,8 @@ void MapblockMeshGenerator::drawSolidNode()
if (data->m_smooth_lighting) {
LightPair lights[6][4];
for (int face = 0; face < 6; ++face) {
if (mask & (1 << face))
continue;
for (int k = 0; k < 4; k++) {
v3s16 corner = light_dirs[light_indices[face][k]];
lights[face][k] = LightPair(getSmoothLightSolid(