Name tag fixxx

Co-Authored-By: Ayush Thoren <ayushthoren@gmail.com>
This commit is contained in:
arsenicviscera 2026-03-11 02:20:39 -07:00
parent 1036b7368e
commit 814b61e649
5 changed files with 15 additions and 4 deletions

View file

@ -470,7 +470,7 @@ void PlayerRenderer::additionalRendering(shared_ptr<LivingEntity> _mob, float a)
}
}
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, wstring msg, float scale, double dist)
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, const wstring& msg, float scale, double dist)
{
#if 0
if (dist < 10 * 10)
@ -496,6 +496,13 @@ void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, d
}
#endif
if (player->instanceof(eTYPE_PLAYER)) {
shared_ptr<Player> p = dynamic_pointer_cast<Player>(player);
p->nametagColor = getNametagColour(p->getPlayerIndex());
}
else {
player->nametagColor = 0xFF000000;
}
LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist);
}