1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-16 14:25:19 -05:00

Use relative position for nametags

This commit is contained in:
SmallJoker 2016-10-06 10:12:14 +02:00 committed by sfan5
parent 009a9f1c6e
commit 997fc59c7e

View File

@ -552,7 +552,7 @@ void Camera::drawNametags()
// shadow can remain. // shadow can remain.
continue; continue;
} }
v3f pos = nametag->parent_node->getPosition() + v3f(0.0, 1.1 * BS, 0.0); v3f pos = nametag->parent_node->getAbsolutePosition() + 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);
if (transformed_pos[3] > 0) { if (transformed_pos[3] > 0) {