aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2015-01-23 01:01:21 +0100
committerCraig Robbins <kde.psych@gmail.com>2015-01-31 03:06:34 +1000
commit285655a8788aefe89df608218774b8336736c1ba (patch)
treecba1a05a52187fe10418d9bd13dc187ce334c700 /src
parent38561023b468b923aa2b7957b807fa2700ea59ce (diff)
downloadminetest-285655a8788aefe89df608218774b8336736c1ba.tar.gz
minetest-285655a8788aefe89df608218774b8336736c1ba.tar.bz2
minetest-285655a8788aefe89df608218774b8336736c1ba.zip
Fix NDT_GLASSLIKE normals
Remove inventorycube() workaround for default:glass in minimal game
Diffstat (limited to 'src')
-rw-r--r--src/content_mapblock.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index b84b69629..9af3be789 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -756,7 +756,8 @@ 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())
@@ -764,10 +765,10 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
// 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