Skip to content

Instantly share code, notes, and snippets.

@x2048
Created May 15, 2022 19:33
Embed
What would you like to do?
Enable color for wield mesh based on wield image
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment