mirror of
https://github.com/moparisthebest/minetest
synced 2025-01-09 04:38:03 -05:00
Fix nametag hiding
Commit
c3b279750e
"Move object nametags to camera"
has added a regression to still display
a shadow if their alpha got set to 0.
This commit is contained in:
parent
c8ff11b417
commit
b8ac7b80e6
@ -540,6 +540,12 @@ void Camera::drawNametags()
|
|||||||
i = m_nametags.begin();
|
i = m_nametags.begin();
|
||||||
i != m_nametags.end(); ++i) {
|
i != m_nametags.end(); ++i) {
|
||||||
Nametag *nametag = *i;
|
Nametag *nametag = *i;
|
||||||
|
if (nametag->nametag_color.getAlpha() == 0) {
|
||||||
|
// Enforce hiding nametag,
|
||||||
|
// because if freetype is enabled, a grey
|
||||||
|
// shadow can remain.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
v3f pos = nametag->parent_node->getPosition() + v3f(0.0, 1.1 * BS, 0.0);
|
v3f pos = nametag->parent_node->getPosition() + v3f(0.0, 1.1 * BS, 0.0);
|
||||||
f32 transformed_pos[4] = { pos.X, pos.Y, pos.Z, 1.0f };
|
f32 transformed_pos[4] = { pos.X, pos.Y, pos.Z, 1.0f };
|
||||||
trans.multiplyWith1x4Matrix(transformed_pos);
|
trans.multiplyWith1x4Matrix(transformed_pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user