Skip to content

Commit

Permalink
Camera: Don't count camera offset twice for Nametagged CAOs
Browse files Browse the repository at this point in the history
  • Loading branch information
RealBadAngel authored and paramat committed Feb 19, 2016
1 parent 4827ee1 commit 5dbaa68
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/camera.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 5dbaa68

Please sign in to comment.