Skip to content

Commit 900b816

Browse files
juhdanadsfan5
authored andcommittedApr 21, 2017
Fix after soft node overlays
This removes a segmentation fault and makes node meshes well colorized.
1 parent 1ffb180 commit 900b816

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

Diff for: ‎src/content_mapblock.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void MapblockMeshGenerator::drawQuad(v3f *coords, const v3s16 &normal)
108108
vertices[j].Pos = coords[j] + origin;
109109
vertices[j].Normal = normal2;
110110
if (data->m_smooth_lighting)
111-
vertices[j].Color = blendLight(coords[j]);
111+
vertices[j].Color = blendLightColor(coords[j]);
112112
else
113113
vertices[j].Color = color;
114114
if (shade_face)
@@ -298,7 +298,7 @@ video::SColor MapblockMeshGenerator::blendLightColor(const v3f &vertex_pos)
298298
video::SColor MapblockMeshGenerator::blendLightColor(const v3f &vertex_pos,
299299
const v3f &vertex_normal)
300300
{
301-
video::SColor color = blendLight(vertex_pos);
301+
video::SColor color = blendLightColor(vertex_pos);
302302
if (!f->light_source)
303303
applyFacesShading(color, vertex_normal);
304304
return color;

Diff for: ‎src/wieldmesh.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
438438
g_extrusion_mesh_cache->grab();
439439
}
440440

441-
scene::SMesh *mesh;
441+
scene::SMesh *mesh = NULL;
442442

443443
// If inventory_image is defined, it overrides everything else
444444
if (def.inventory_image != "") {

0 commit comments

Comments
 (0)
Please sign in to comment.