diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2017-06-01 23:18:55 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-01 23:18:55 +0200 |
commit | 001de6ffbac83bcd41ecda075d79d265a69c7d42 (patch) | |
tree | 59b1857bb89be11a59746d4479f047806a7a42f6 /src/hud.cpp | |
parent | 1c69476d9f10540088ead63c8bcae91f46bc84d8 (diff) | |
download | minetest-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.cpp | 5 |
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; |