Skip to content

Commit

Permalink
Fix NDT_GLASSLIKE normals
Browse files Browse the repository at this point in the history
Remove inventorycube() workaround for default:glass in minimal game
  • Loading branch information
kahrl authored and Zeno- committed Jan 30, 2015
1 parent 3856102 commit 285655a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion games/minimal/mods/default/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ minetest.register_node("default:glass", {
description = "Glass",
drawtype = "glasslike",
tiles ={"default_glass.png"},
inventory_image = minetest.inventorycube("default_glass.png"),
paramtype = "light",
sunlight_propagates = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
Expand Down
11 changes: 6 additions & 5 deletions src/content_mapblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -756,18 +756,19 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
for(u32 j=0; j<6; j++)
{
// Check this neighbor
v3s16 n2p = blockpos_nodes + p + g_6dirs[j];
v3s16 dir = g_6dirs[j];
v3s16 n2p = blockpos_nodes + p + dir;
MapNode n2 = data->m_vmanip.getNodeNoEx(n2p);
// Don't make face if neighbor is of same type
if(n2.getContent() == n.getContent())
continue;

// The face at Z+
video::S3DVertex vertices[4] = {
video::S3DVertex(-BS/2,-BS/2,BS/2, 0,0,0, c, 1,1),
video::S3DVertex(BS/2,-BS/2,BS/2, 0,0,0, c, 0,1),
video::S3DVertex(BS/2,BS/2,BS/2, 0,0,0, c, 0,0),
video::S3DVertex(-BS/2,BS/2,BS/2, 0,0,0, c, 1,0),
video::S3DVertex(-BS/2,-BS/2,BS/2, dir.X,dir.Y,dir.Z, c, 1,1),
video::S3DVertex(BS/2,-BS/2,BS/2, dir.X,dir.Y,dir.Z, c, 0,1),
video::S3DVertex(BS/2,BS/2,BS/2, dir.X,dir.Y,dir.Z, c, 0,0),
video::S3DVertex(-BS/2,BS/2,BS/2, dir.X,dir.Y,dir.Z, c, 1,0),
};

// Rotations in the g_6dirs format
Expand Down

0 comments on commit 285655a

Please sign in to comment.