diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-31 17:40:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-31 18:09:11 +0300 |
commit | b0e37be06900f3889dfe9dffa55d799cad2f1f36 (patch) | |
tree | 6e48f177d48a8dfbe94f7844dbf30a73e80b7268 /src/being/being.cpp | |
parent | d120817f73712bf2fd22be231200df752760d0d3 (diff) | |
download | mv-b0e37be06900f3889dfe9dffa55d799cad2f1f36.tar.gz mv-b0e37be06900f3889dfe9dffa55d799cad2f1f36.tar.bz2 mv-b0e37be06900f3889dfe9dffa55d799cad2f1f36.tar.xz mv-b0e37be06900f3889dfe9dffa55d799cad2f1f36.zip |
Show player name on fixed position on top.
Before it depend on sprite height and some times it was wrong.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
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(); } |