diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-14 18:34:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-14 18:34:14 +0300 |
commit | 2fe16d770e2d0990e74711039a15a47d6a57782d (patch) | |
tree | a9c54f8805941ddd9f7cbd0e3487493fbff0b483 /src/being/being.cpp | |
parent | 7450c2b0f968a5dada1222dbbc137362d331e491 (diff) | |
download | manaplus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.gz manaplus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.bz2 manaplus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.xz manaplus-2fe16d770e2d0990e74711039a15a47d6a57782d.zip |
Use haveServerHp feature in getting hp in tmwa.
Also use haveServerHp in drawing hp bar.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 57e212b6a..853fb20d6 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -61,6 +61,7 @@ #include "net/packetlimiter.h" #include "net/pethandler.h" #include "net/playerhandler.h" +#include "net/serverfeatures.h" #include "resources/attack.h" #include "resources/emoteinfo.h" @@ -2467,7 +2468,7 @@ void Being::drawHpBar(Graphics *const graphics, const int maxHP, const int hp, const int dx = static_cast<const int>(static_cast<float>(width) / p); - if (serverVersion < 1) + if (!Net::getServerFeatures()->haveServerHp()) { // old servers if ((!damage && (this != localPlayer || hp == maxHP)) || (!hp && maxHP == damage)) @@ -2486,7 +2487,7 @@ void Being::drawHpBar(Graphics *const graphics, const int maxHP, const int hp, } } else - { // evol servers + { if (hp == maxHP) { graphics->setColor(userPalette->getColorWithAlpha(color1)); |