From 6a64f7e58501280751d6cbe4f3a474cdb1a93f46 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 31 Jul 2017 19:42:48 +0300 Subject: Improve a bit settings.playerNameOffset usage. --- src/being/being.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index c051d3038..bf1b2db59 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2292,8 +2292,7 @@ void Being::drawEmotion(Graphics *restrict const graphics, } else { - int height = settings.playerNameOffset; - y = py + height + 16; + y = py + settings.playerNameOffset + 16; } } else @@ -2315,7 +2314,7 @@ void Being::drawEmotion(Graphics *restrict const graphics, else if (mShowBadges == BadgeDrawType::Bottom) { x = px + 8 - mBadgesCount * 8; - int height = settings.playerNameOffset; + const int height = settings.playerNameOffset; if (mVisibleNamePos == VisibleNamePos::Buttom) y = py + height; else @@ -2453,8 +2452,7 @@ void Being::updateCoords() restrict2 if (mType == ActorType::Monster || mVisibleNamePos == VisibleNamePos::Top) { - int height = settings.playerNameOffset; - offsetY += - height - mDispName->getHeight(); + offsetY += - settings.playerNameOffset - mDispName->getHeight(); } mDispName->adviseXY(offsetX, offsetY, mMoveNames); -- cgit v1.2.3-60-g2f50