aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-04-21 18:04:06 +0200
committersfan5 <sfan5@live.de>2017-04-21 19:18:09 +0200
commit900b816162401a6d9006334e2e8e8a9a26a1613b (patch)
tree44b45f30f4d6e98aca8c26d35aad301f105ee6ce /src
parent1ffb180868ffcec6812cd3aac8f56ffefb91c8bc (diff)
downloadminetest-900b816162401a6d9006334e2e8e8a9a26a1613b.tar.gz
minetest-900b816162401a6d9006334e2e8e8a9a26a1613b.tar.bz2
minetest-900b816162401a6d9006334e2e8e8a9a26a1613b.zip
Fix after soft node overlays
This removes a segmentation fault and makes node meshes well colorized.
Diffstat (limited to 'src')
-rw-r--r--src/content_mapblock.cpp4
-rw-r--r--src/wieldmesh.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 9f4223bac..6673e2bd9 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -108,7 +108,7 @@ void MapblockMeshGenerator::drawQuad(v3f *coords, const v3s16 &normal)
vertices[j].Pos = coords[j] + origin;
vertices[j].Normal = normal2;
if (data->m_smooth_lighting)
- vertices[j].Color = blendLight(coords[j]);
+ vertices[j].Color = blendLightColor(coords[j]);
else
vertices[j].Color = color;
if (shade_face)
@@ -298,7 +298,7 @@ video::SColor MapblockMeshGenerator::blendLightColor(const v3f &vertex_pos)
video::SColor MapblockMeshGenerator::blendLightColor(const v3f &vertex_pos,
const v3f &vertex_normal)
{
- video::SColor color = blendLight(vertex_pos);
+ video::SColor color = blendLightColor(vertex_pos);
if (!f->light_source)
applyFacesShading(color, vertex_normal);
return color;
diff --git a/src/wieldmesh.cpp b/src/wieldmesh.cpp
index 2b23d9e02..8b1477bb7 100644
--- a/src/wieldmesh.cpp
+++ b/src/wieldmesh.cpp
@@ -438,7 +438,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
g_extrusion_mesh_cache->grab();
}
- scene::SMesh *mesh;
+ scene::SMesh *mesh = NULL;
// If inventory_image is defined, it overrides everything else
if (def.inventory_image != "") {