From b0e37be06900f3889dfe9dffa55d799cad2f1f36 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 31 Jul 2017 17:40:20 +0300 Subject: Show player name on fixed position on top. Before it depend on sprite height and some times it was wrong. --- src/being/being.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index 6eae50281..31ea99b27 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2292,9 +2292,7 @@ void Being::drawEmotion(Graphics *restrict const graphics, } else { - int height = getHeight(); - if (height < 64) - height = 64; + int height = settings.playerNameOffset; y = py + height + 16; } } @@ -2317,9 +2315,7 @@ void Being::drawEmotion(Graphics *restrict const graphics, else if (mShowBadges == BadgeDrawType::Bottom) { x = px + 8 - mBadgesCount * 8; - int height = getHeight(); - if (height < 64) - height = 64; + int height = settings.playerNameOffset; if (mVisibleNamePos == VisibleNamePos::Buttom) y = py + height; else @@ -2457,9 +2453,7 @@ void Being::updateCoords() restrict2 if (mType == ActorType::Monster || mVisibleNamePos == VisibleNamePos::Top) { - int height = getHeight(); - if (height < 64) - height = 64; + int height = settings.playerNameOffset; offsetY += - height - mDispName->getHeight(); } -- cgit v1.2.3-60-g2f50