summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-12-08 22:06:06 +0300
committerAndrei Karas <akaras@inbox.ru>2011-12-08 22:06:06 +0300
commitb595695ec90d7e9207675f9b8c8ae2e978b03c5f (patch)
treebb727427b81035e62af4b4e79e9d1c8a57da324e
parent4a4d6bd39b88933f5db4b632b28e1444062ad25a (diff)
downloadManaVerse-b595695ec90d7e9207675f9b8c8ae2e978b03c5f.tar.gz
ManaVerse-b595695ec90d7e9207675f9b8c8ae2e978b03c5f.tar.bz2
ManaVerse-b595695ec90d7e9207675f9b8c8ae2e978b03c5f.tar.xz
ManaVerse-b595695ec90d7e9207675f9b8c8ae2e978b03c5f.zip
Fix monster hp bar in evol server.
-rw-r--r--src/being.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 185891509..9e5ae3ad1 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2071,11 +2071,10 @@ void Being::drawHpBar(Graphics *graphics, int maxHP, int hp, int damage,
int dx = static_cast<int>(static_cast<float>(width) / p);
- if ((!damage && (this != player_node || hp == maxHP))
+ if ((!damage && (this != player_node || hp == maxHP) && serverVersion < 1)
|| (!hp && maxHP == damage))
{
graphics->setColor(userPalette->getColorWithAlpha(color1));
-
graphics->fillRectangle(gcn::Rectangle(
x, y, dx, height));
return;
@@ -2083,19 +2082,16 @@ void Being::drawHpBar(Graphics *graphics, int maxHP, int hp, int damage,
else if (width - dx <= 0)
{
graphics->setColor(userPalette->getColorWithAlpha(color2));
-
graphics->fillRectangle(gcn::Rectangle(
x, y, width, height));
return;
}
graphics->setColor(userPalette->getColorWithAlpha(color1));
-
graphics->fillRectangle(gcn::Rectangle(
x, y, dx, height));
graphics->setColor(userPalette->getColorWithAlpha(color2));
-
graphics->fillRectangle(gcn::Rectangle(
x + dx, y, width - dx, height));
}