This commit is contained in:
Tyler Reese 2026-04-08 00:00:53 +03:00 committed by GitHub
commit 092dee18a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 4 deletions

View file

@ -485,7 +485,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)
@ -511,6 +511,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);
}