Use TILE_MATERIAL_ALPHA for use_texture_alpha entity flag (#9639)
authorAlex <24834740+GreenXenith@users.noreply.github.com>
Sat, 11 Apr 2020 11:45:14 +0000 (04:45 -0700)
committerGitHub <noreply@github.com>
Sat, 11 Apr 2020 11:45:14 +0000 (13:45 +0200)
Fixes #9637.

src/client/content_cao.cpp

index 798899f9acb42aa06a36cc193fa0d25b6714ceb0..39ea4ab1ef7114ac26c264d8b8232efae790fbcc 100644 (file)
@@ -584,7 +584,7 @@ void GenericCAO::addToScene(ITextureSource *tsrc)
                IShaderSource *shader_source = m_client->getShaderSource();
                u32 shader_id = shader_source->getShader(
                                "object_shader",
-                               TILE_MATERIAL_BASIC,
+                               (m_prop.use_texture_alpha) ? TILE_MATERIAL_ALPHA : TILE_MATERIAL_BASIC,
                                NDT_NORMAL);
                m_material_type = shader_source->getShaderInfo(shader_id).material;
        } else {