Camera: Don't count camera offset twice for Nametagged CAOs
authorRealBadAngel <maciej.kasatkin@o2.pl>
Fri, 19 Feb 2016 13:13:21 +0000 (14:13 +0100)
committerparamat <mat.gregory@virginmedia.com>
Fri, 19 Feb 2016 14:52:19 +0000 (14:52 +0000)
src/camera.cpp

index 8aac32123b42042f06fd06ec9145b5e1d03fbd67..0ce6bb345869c05e0b96df36f0a0b23fb69f386d 100644 (file)
@@ -675,8 +675,7 @@ void Camera::drawNametags()
                        i = m_nametags.begin();
                        i != m_nametags.end(); ++i) {
                Nametag *nametag = *i;
-               v3f pos = nametag->parent_node->getPosition() -
-                       intToFloat(m_camera_offset, BS) + 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 };
                trans.multiplyWith1x4Matrix(transformed_pos);
                if (transformed_pos[3] > 0) {