From 72d55371d2d5bc2a14567c20a7c391a24c9f1837 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 3 Jun 2025 09:32:41 +1000 Subject: add player.nametag, player.setNametag, world.entityNametag --- source/frontend/StarNameplatePainter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/frontend/StarNameplatePainter.cpp') diff --git a/source/frontend/StarNameplatePainter.cpp b/source/frontend/StarNameplatePainter.cpp index 0666af0..7dce6a5 100644 --- a/source/frontend/StarNameplatePainter.cpp +++ b/source/frontend/StarNameplatePainter.cpp @@ -39,7 +39,7 @@ void NameplatePainter::update(float dt, WorldClientPtr const& world, WorldCamera foundEntities.insert(entity->entityId()); if (!m_entitiesWithNametags.contains(entity->entityId())) { - Nametag nametag = {entity->name(), entity->statusText(), entity->nametagColor(), 1.0f, entity->entityId()}; + Nametag nametag = {entity->nametag(), entity->statusText(), entity->nametagColor(), 1.0f, entity->entityId()}; RectF boundBox = determineBoundBox(Vec2F(), nametag); m_nametags.addBubble(Vec2F(), boundBox, std::move(nametag)); } @@ -54,7 +54,7 @@ void NameplatePainter::update(float dt, WorldClientPtr const& world, WorldCamera bubbleState.boundBox = determineBoundBox(bubbleState.idealDestination, nametag); nametag.statusText = entity->statusText(); - nametag.name = entity->name(); + nametag.name = entity->nametag(); nametag.color = entity->nametagColor(); bool fullyOnScreen = world->geometry().rectContains(camera.worldScreenRect(), entity->position()); if (inspectionMode) -- cgit v1.2.3