Skip to content

Commit

Permalink
Fix after soft node overlays
Browse files Browse the repository at this point in the history
This removes a segmentation fault and makes node meshes well colorized.
  • Loading branch information
juhdanad authored and sfan5 committed Apr 21, 2017
1 parent 1ffb180 commit 900b816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/content_mapblock.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/wieldmesh.cpp
Expand Up @@ -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 != "") {
Expand Down

0 comments on commit 900b816

Please sign in to comment.