summaryrefslogtreecommitdiff
path: root/src/hud.cpp
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-06-01 23:18:55 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-06-01 23:18:55 +0200
commit001de6ffbac83bcd41ecda075d79d265a69c7d42 (patch)
tree59b1857bb89be11a59746d4479f047806a7a42f6 /src/hud.cpp
parent1c69476d9f10540088ead63c8bcae91f46bc84d8 (diff)
downloadminetest-001de6ffbac83bcd41ecda075d79d265a69c7d42.tar.gz
minetest-001de6ffbac83bcd41ecda075d79d265a69c7d42.tar.bz2
minetest-001de6ffbac83bcd41ecda075d79d265a69c7d42.zip
Do not shade inventory items with textures (#5869)
This commit restores the old behavior: if an inventory item has an own inventory texture, it will not be shaded.
Diffstat (limited to 'src/hud.cpp')
-rw-r--r--src/hud.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hud.cpp b/src/hud.cpp
index 72145b4da..a2f031b4c 100644
--- a/src/hud.cpp
+++ b/src/hud.cpp
@@ -698,7 +698,10 @@ void drawItemStack(video::IVideoDriver *driver,
if (p->override_base)
c = p->color;
}
- colorizeMeshBuffer(buf, &c);
+ if (imesh->needs_shading)
+ colorizeMeshBuffer(buf, &c);
+ else
+ setMeshBufferColor(buf, c);
video::SMaterial &material = buf->getMaterial();
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
material.Lighting = false;