1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-15 22:05:07 -05:00

Recalculate normals for mesh #0. Fix for issue #1902.

This commit is contained in:
RealBadAngel 2014-12-05 01:04:25 +01:00
parent f7f7fec497
commit a648120d54

View File

@ -854,6 +854,7 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef)
v3f scale = v3f(1.0, 1.0, 1.0) * BS * f->visual_scale; v3f scale = v3f(1.0, 1.0, 1.0) * BS * f->visual_scale;
scaleMesh(f->mesh_ptr[0], scale); scaleMesh(f->mesh_ptr[0], scale);
recalculateBoundingBox(f->mesh_ptr[0]); recalculateBoundingBox(f->mesh_ptr[0]);
meshmanip->recalculateNormals(f->mesh_ptr[0], true, false);
} }
} else if ((f->drawtype == NDT_NODEBOX) && } else if ((f->drawtype == NDT_NODEBOX) &&
((f->node_box.type == NODEBOX_REGULAR) || ((f->node_box.type == NODEBOX_REGULAR) ||
@ -866,6 +867,7 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef)
v3f scale = v3f(1.0, 1.0, 1.0) * f->visual_scale; v3f scale = v3f(1.0, 1.0, 1.0) * f->visual_scale;
scaleMesh(f->mesh_ptr[0], scale); scaleMesh(f->mesh_ptr[0], scale);
recalculateBoundingBox(f->mesh_ptr[0]); recalculateBoundingBox(f->mesh_ptr[0]);
meshmanip->recalculateNormals(f->mesh_ptr[0], true, false);
} }
//Cache 6dfacedir and wallmounted rotated clones of meshes //Cache 6dfacedir and wallmounted rotated clones of meshes