summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
commitd14bb7a27ee23cc83b3af1db2f1976eaaa55d78a (patch)
tree5f128768c66436eefd70632f02889607596609d4 /src/being.cpp
parentf1e92aca00a4859047e83fab76220767b9a2f814 (diff)
parente93e6beb456d105987da3190c2a80847b6900081 (diff)
downloadplus-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.gz
plus-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.bz2
plus-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.xz
plus-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.zip
Merge branch 'master' into strippedstripped1.1.10.16
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 2ed05449a..5eac242fd 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -229,6 +229,7 @@ Being::Being(int id, Type type, Uint16 subtype, Map *map):
mGender(GENDER_UNSPECIFIED),
mParty(0),
mIsGM(false),
+ mAttackRange(1),
mType(type),
mX(0), mY(0),
mDamageTaken(0),
@@ -1623,7 +1624,9 @@ void Being::updateColors()
mNameColor = &userPalette->getColor(UserPalette::FRIEND);
}
else if (player_relations.getRelation(mName) ==
- PlayerRelation::DISREGARDED)
+ PlayerRelation::DISREGARDED
+ || player_relations.getRelation(mName) ==
+ PlayerRelation::BLACKLISTED)
{
mNameColor = &userPalette->getColor(UserPalette::DISREGARDED);
}
@@ -1992,7 +1995,11 @@ bool Being::drawSpriteAt(Graphics *graphics, int x, int y) const
if (mHighlightMonsterAttackRange && mType == ActorSprite::MONSTER
&& isAlive())
{
- const int attackRange = 32;
+ int attackRange;
+ if (mAttackRange)
+ attackRange = 32 * mAttackRange;
+ else
+ attackRange = 32;
graphics->setColor(userPalette->getColorWithAlpha(
UserPalette::MONSTER_ATTACK_RANGE));