1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add no_texture.png as fallback for unspecified textures

This commit is contained in:
Wuzzy 2021-10-20 19:50:16 +00:00 committed by GitHub
parent c82ec8b210
commit 86b44ecd82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 68 additions and 23 deletions

View file

@ -458,9 +458,14 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client, bool che
material.setFlag(video::EMF_TRILINEAR_FILTER, m_trilinear_filter);
}
return;
} else if (!def.inventory_image.empty()) {
setExtruded(def.inventory_image, def.inventory_overlay, def.wield_scale,
tsrc, 1);
} else {
if (!def.inventory_image.empty()) {
setExtruded(def.inventory_image, def.inventory_overlay, def.wield_scale,
tsrc, 1);
} else {
setExtruded("no_texture.png", "", def.wield_scale, tsrc, 1);
}
m_colors.emplace_back();
// overlay is white, if present
m_colors.emplace_back(true, video::SColor(0xFFFFFFFF));