Browse Source

Initialize wield mesh color when wield_image is set

#12245
Dmitry Kostenko 2 years ago
parent
commit
8756b7a735
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/client/wieldmesh.cpp

+ 3 - 0
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;
 	}