1
0
mirror of https://github.com/minetest/minetest.git synced 2024-11-13 22:10:28 +01:00

Initialize wield mesh color when wield_image is set

#12245
This commit is contained in:
Dmitry Kostenko 2022-05-15 21:44:55 +02:00
parent ec9f157512
commit 8756b7a735

View File

@ -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;
}