diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-13 18:28:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-13 18:28:33 +0300 |
commit | ac56a47abb8b6a2dc184e1a39c3c7989fd135550 (patch) | |
tree | 31a51606478458f5c8ce485071f7f169fdc2e789 /src/being/being.cpp | |
parent | ad0e1575e9532b027e7ad46d5e450fe7ed4389a7 (diff) | |
download | manaplus-ac56a47abb8b6a2dc184e1a39c3c7989fd135550.tar.gz manaplus-ac56a47abb8b6a2dc184e1a39c3c7989fd135550.tar.bz2 manaplus-ac56a47abb8b6a2dc184e1a39c3c7989fd135550.tar.xz manaplus-ac56a47abb8b6a2dc184e1a39c3c7989fd135550.zip |
Improve a bit check in Being::drawSpriteAt.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 4565e6f01..7be22145b 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2929,17 +2929,17 @@ void Being::drawSpriteAt(Graphics *restrict const graphics, const int x, const int y) const restrict2 { - if (!userPalette) - { - CompoundSprite::draw(graphics, x, y); - return; - } - if (mHighlightMapPortals && mMap && mSubType == fromInt(45, BeingTypeId) && !mMap->getHasWarps()) { + if (!userPalette) + { + CompoundSprite::draw(graphics, x, y); + return; + } + graphics->setColor(userPalette-> getColorWithAlpha(UserColorId::PORTAL_HIGHLIGHT)); @@ -2956,6 +2956,12 @@ void Being::drawSpriteAt(Graphics *restrict const graphics, mType == ActorType::Monster && isAlive()) { + if (!userPalette) + { + CompoundSprite::draw(graphics, x, y); + return; + } + int attackRange; if (mAttackRange) attackRange = mapTileSize * mAttackRange; |