Skip to content

Instantly share code, notes, and snippets.

@x2048
Created May 15, 2022 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x2048/27826a45ef19183e06b0d43f141704a3 to your computer and use it in GitHub Desktop.
Save x2048/27826a45ef19183e06b0d43f141704a3 to your computer and use it in GitHub Desktop.
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