diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-31 14:18:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-31 14:18:08 +0300 |
commit | 8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc (patch) | |
tree | a085aa87be20d1355f1aceaead205d6005b513e0 /src/being.cpp | |
parent | b637ace3685fb35e7de7c4e7cdae0638c80cd45a (diff) | |
download | manaverse-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.gz manaverse-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.bz2 manaverse-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.tar.xz manaverse-8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc.zip |
Add option to move player names (disabled by default).
In old implimentation names was always moved.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp index 22ce33f41..feb0cfbbc 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -189,6 +189,7 @@ bool Being::mShowLevel = false; bool Being::mShowPlayersStatus = false; bool Being::mEnableReorderSprites = true; bool Being::mHideErased = false; +bool Being::mMoveNames = false; int Being::mAwayEffect = -1; std::list<BeingCacheEntry*> beingInfoCache; @@ -362,7 +363,7 @@ void Being::setPosition(const Vector &pos) if (mText) { mText->adviseXY(static_cast<int>(pos.x), static_cast<int>(pos.y) - - getHeight() - mText->getHeight() - 6); + - getHeight() - mText->getHeight() - 6, mMoveNames); } } @@ -1587,11 +1588,11 @@ void Being::updateCoords() if (mType == MONSTER) { mDispName->adviseXY(getPixelX(), - getPixelY() - getHeight() - mDispName->getHeight()); + getPixelY() - getHeight() - mDispName->getHeight(), mMoveNames); } else { - mDispName->adviseXY(getPixelX(), getPixelY()); + mDispName->adviseXY(getPixelX(), getPixelY(), mMoveNames); } } @@ -1927,6 +1928,7 @@ void Being::reReadConfig() mShowPlayersStatus = config.getBoolValue("showPlayersStatus"); mEnableReorderSprites = config.getBoolValue("enableReorderSprites"); mHideErased = config.getBoolValue("hideErased"); + mMoveNames = config.getBoolValue("moveNames"); mUpdateConfigTime = cur_time; } |