aboutsummaryrefslogtreecommitdiff
path: root/src/hud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hud.cpp')
-rw-r--r--src/hud.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hud.cpp b/src/hud.cpp
index f558acf1e..c482912e9 100644
--- a/src/hud.cpp
+++ b/src/hud.cpp
@@ -687,8 +687,9 @@ void drawItemStack(video::IVideoDriver *driver,
assert(buf->getHardwareMappingHint_Vertex() == scene::EHM_NEVER);
video::SColor c = basecolor;
if (imesh->buffer_colors.size() > j) {
- std::pair<bool, video::SColor> p = imesh->buffer_colors[j];
- c = p.first ? p.second : basecolor;
+ ItemPartColor *p = &imesh->buffer_colors[j];
+ if (p->override_base)
+ c = p->color;
}
colorizeMeshBuffer(buf, &c);
video::SMaterial &material = buf->getMaterial();