This commit is contained in:
GabsPuNs
2026-03-21 20:06:23 -04:00
parent 4adc6796ae
commit 1cd9a4a043
27 changed files with 101 additions and 57 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,7 +496,17 @@ void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, d
}
#endif
LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist);
shared_ptr<Player> pPlayer = dynamic_pointer_cast<Player>(player);
int color = getNametagColour(pPlayer->getPlayerIndex());
if (player->isSleeping())
{
renderNameTag(player, msg, x, y - 1.5f, z, 64, color);
}
else
{
renderNameTag(player, msg, x, y, z, 64, color);
}
}
void PlayerRenderer::scale(shared_ptr<LivingEntity> player, float a)