mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Move the nametag back to the top of the player (#6179)
read the actual height of the collisionbox
This commit is contained in:
parent
765fd9a0bc
commit
d504831ee2
3 changed files with 18 additions and 7 deletions
10
src/camera.h
10
src/camera.h
|
@ -39,15 +39,18 @@ class WieldMeshSceneNode;
|
|||
struct Nametag {
|
||||
Nametag(scene::ISceneNode *a_parent_node,
|
||||
const std::string &a_nametag_text,
|
||||
const video::SColor &a_nametag_color):
|
||||
const video::SColor &a_nametag_color,
|
||||
const v3f a_nametag_pos):
|
||||
parent_node(a_parent_node),
|
||||
nametag_text(a_nametag_text),
|
||||
nametag_color(a_nametag_color)
|
||||
nametag_color(a_nametag_color),
|
||||
nametag_pos(a_nametag_pos)
|
||||
{
|
||||
}
|
||||
scene::ISceneNode *parent_node;
|
||||
std::string nametag_text;
|
||||
video::SColor nametag_color;
|
||||
v3f nametag_pos;
|
||||
};
|
||||
|
||||
enum CameraMode {CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT};
|
||||
|
@ -157,7 +160,8 @@ public:
|
|||
}
|
||||
|
||||
Nametag *addNametag(scene::ISceneNode *parent_node,
|
||||
std::string nametag_text, video::SColor nametag_color);
|
||||
const std::string &nametag_text, video::SColor nametag_color,
|
||||
const v3f &pos);
|
||||
|
||||
void removeNametag(Nametag *nametag);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue