From 3e07c5bf822afe01525a9a3ef499ae895c22a130 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 2 Dec 2012 02:57:14 +0200 Subject: Fix tile MaterialType to make sense and make lava surface be shader'd lower like water --- src/mapblock_mesh.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/mapblock_mesh.cpp') diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index c871b6dbe..a9f14f8f0 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1081,14 +1081,10 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data): material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; material.setTexture(0, p.tile.texture.atlas); - p.tile.applyMaterialOptions(material); - - if(enable_shaders){ - if(material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF) - material.MaterialType = shadermat1; - if(material.MaterialType == video::EMT_TRANSPARENT_VERTEX_ALPHA) - material.MaterialType = shadermat2; - } + if(enable_shaders) + p.tile.applyMaterialOptionsWithShaders(material, shadermat1, shadermat2); + else + p.tile.applyMaterialOptions(material); // Create meshbuffer -- cgit v1.2.3