summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-31 17:40:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-31 18:09:11 +0300
commitb0e37be06900f3889dfe9dffa55d799cad2f1f36 (patch)
tree6e48f177d48a8dfbe94f7844dbf30a73e80b7268 /src/being
parentd120817f73712bf2fd22be231200df752760d0d3 (diff)
downloadmv-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')
-rw-r--r--src/being/being.cpp12
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();
}