summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-10 21:01:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-10 21:01:16 +0300
commit16cc2e4a4204ee95e8256f3d7eacaada99f53309 (patch)
treec8e9589c988e83d0d4d075d65b9ae887d80fceb0 /src
parenteca7b8b54fafa626f4f1b0c42f4195b44767590f (diff)
downloadmanaverse-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')
-rw-r--r--src/being/being.cpp37
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);
}
}