New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the nametag back to the top of the player #6179
Conversation
it's not the correct fix, as now we can change model, it's not a fixed size like before. Can you find the correct value of the model instead ? |
7d8b34e
to
4fcce8b
Compare
Updated. |
src/camera.h
Outdated
@@ -157,7 +160,8 @@ class Camera | |||
} | |||
|
|||
Nametag *addNametag(scene::ISceneNode *parent_node, | |||
std::string nametag_text, video::SColor nametag_color); | |||
std::string nametag_text, video::SColor nametag_color, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, can you just fix to use const ref on the string and the v3f please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job
src/content_cao.cpp
Outdated
@@ -895,8 +895,11 @@ void GenericCAO::addToScene(ITextureSource *tsrc) | |||
scene::ISceneNode *node = getSceneNode(); | |||
if (node && m_prop.nametag != "" && !m_is_local_player) { | |||
// Add nametag | |||
v3f pos; | |||
pos.Y = m_prop.collisionbox.MaxEdge.Y + 0.1f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs to be higher, as before it was position + 1.1, which was 2.1 above foot position, the collisionbox top is at 1.77 above foot position, so add 0.3f for consistency and some clearence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
read the actual height of the collisionbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. Works.
read the actual height of the collisionbox
read the actual height of the collisionbox
See #6174