From ac56a47abb8b6a2dc184e1a39c3c7989fd135550 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Mar 2016 18:28:33 +0300 Subject: Improve a bit check in Being::drawSpriteAt. --- src/being/being.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2