diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-10 21:01:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-10 21:01:16 +0300 |
commit | 16cc2e4a4204ee95e8256f3d7eacaada99f53309 (patch) | |
tree | c8e9589c988e83d0d4d075d65b9ae887d80fceb0 /src/being/being.cpp | |
parent | eca7b8b54fafa626f4f1b0c42f4195b44767590f (diff) | |
download | manaverse-16cc2e4a4204ee95e8256f3d7eacaada99f53309.tar.gz manaverse-16cc2e4a4204ee95e8256f3d7eacaada99f53309.tar.bz2 manaverse-16cc2e4a4204ee95e8256f3d7eacaada99f53309.tar.xz manaverse-16cc2e4a4204ee95e8256f3d7eacaada99f53309.zip |
Fix a bit formatting in Being::drawSpriteAt.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index cb276801a..c058380c1 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2941,9 +2941,9 @@ void Being::drawSpriteAt(Graphics *restrict const graphics, gui->getFont()->drawString(graphics, color, color, mName, x, y); } } - - if (mHighlightMonsterAttackRange && mType == ActorType::Monster - && isAlive()) + else if (mHighlightMonsterAttackRange && + mType == ActorType::Monster && + isAlive()) { int attackRange; if (mAttackRange) @@ -2961,8 +2961,11 @@ void Being::drawSpriteAt(Graphics *restrict const graphics, CompoundSprite::draw(graphics, x, y); - if (mShowMobHP && mInfo && localPlayer && localPlayer->getTarget() == this - && mType == ActorType::Monster) + if (mShowMobHP && + mInfo && + localPlayer && + localPlayer->getTarget() == this && + mType == ActorType::Monster) { // show hp bar here int maxHP = mMaxHP; @@ -2980,17 +2983,21 @@ void Being::drawSpriteAt(Graphics *restrict const graphics, 2 * 50, 4); } - if (mShowOwnHP - && mInfo - && localPlayer == this - && mAction != BeingAction::DEAD) + if (mShowOwnHP && + mInfo && + localPlayer == this && + mAction != BeingAction::DEAD) { - drawHpBar(graphics, PlayerInfo::getAttribute(Attributes::MAX_HP), - PlayerInfo::getAttribute(Attributes::HP), 0, - UserColorId::PLAYER_HP, UserColorId::PLAYER_HP2, - x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), - y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), - 2 * 50, 4); + drawHpBar(graphics, + PlayerInfo::getAttribute(Attributes::MAX_HP), + PlayerInfo::getAttribute(Attributes::HP), + 0, + UserColorId::PLAYER_HP, + UserColorId::PLAYER_HP2, + x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), + y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), + 2 * 50, + 4); } } |