aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorDmitry Kostenko <codeforsmile@gmail.com>2022-05-15 21:44:55 +0200
committerDmitry Kostenko <codeforsmile@gmail.com>2022-05-15 21:44:55 +0200
commit8756b7a735084c6a80f5ab031fa1d889528d6fde (patch)
treefb4334472d3c838def98bdef8877f0008df0d363 /src/client
parentec9f1575121e3b064b919bca7efddfa8b0fc4e65 (diff)
downloadminetest-8756b7a735084c6a80f5ab031fa1d889528d6fde.tar.gz
minetest-8756b7a735084c6a80f5ab031fa1d889528d6fde.tar.bz2
minetest-8756b7a735084c6a80f5ab031fa1d889528d6fde.zip
Initialize wield mesh color when wield_image is set
#12245
Diffstat (limited to 'src/client')
-rw-r--r--src/client/wieldmesh.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp
index d5c191935..25b343573 100644
--- a/src/client/wieldmesh.cpp
+++ b/src/client/wieldmesh.cpp
@@ -386,6 +386,9 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client, bool che
m_colors.emplace_back();
// overlay is white, if present
m_colors.emplace_back(true, video::SColor(0xFFFFFFFF));
+ // initialize the color
+ if (!m_lighting)
+ setColor(video::SColor(0xFFFFFFFF));
return;
}