diff options
-rw-r--r-- | src/being/being.cpp | 12 | ||||
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/defaults.cpp | 1 | ||||
-rw-r--r-- | src/settings.h | 2 |
4 files changed, 8 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(); } diff --git a/src/client.cpp b/src/client.cpp index 5867c9474..57e870b05 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1730,6 +1730,8 @@ void Client::initPaths() if (settings.linkCommandSymbol.empty()) settings.linkCommandSymbol = "="; settings.overweightPercent = paths.getIntValue("overweightPercent"); + settings.playerNameOffset = paths.getIntValue( + "playerNameOffset"); } void Client::initTradeFilter() diff --git a/src/defaults.cpp b/src/defaults.cpp index 24aa3452c..934683f57 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -691,6 +691,7 @@ DefaultsData* getPathsDefaults() AddDEF("defaultPaletteFile", "palette.gpl"); AddDEF("overweightPercent", 50); + AddDEF("playerNameStandOffset", 64); #ifdef TMWA_SUPPORT AddDEF("gmDefaultLevel", 60); diff --git a/src/settings.h b/src/settings.h index d9378b2db..7570e0df2 100644 --- a/src/settings.h +++ b/src/settings.h @@ -76,6 +76,7 @@ class Settings final crazyMoveState(0U), targetingType(0U), overweightPercent(50U), + playerNameOffset(64), mapDrawType(MapType::NORMAL), emoteType(EmoteType::Player), persistentIp(true), @@ -137,6 +138,7 @@ class Settings final unsigned int crazyMoveState; unsigned int targetingType; unsigned int overweightPercent; + int playerNameOffset; MapTypeT mapDrawType; EmoteTypeT emoteType; bool persistentIp; |