mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Camera: Don't count camera offset twice for Nametagged CAOs
This commit is contained in:
parent
4827ee1258
commit
5dbaa68967
1 changed files with 1 additions and 2 deletions
|
@ -675,8 +675,7 @@ 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;
|
||||||
v3f pos = nametag->parent_node->getPosition() -
|
v3f pos = nametag->parent_node->getPosition() + v3f(0.0, 1.1 * BS, 0.0);
|
||||||
intToFloat(m_camera_offset, BS) + 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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue