summaryrefslogtreecommitdiff
path: root/src/actorspritemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r--src/actorspritemanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 10d8a941e..61fd35c95 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -196,6 +196,7 @@ ActorSpriteManager::ActorSpriteManager() :
config.addListener("targetOnlyReachable", this);
config.addListener("cyclePlayers", this);
config.addListener("cycleMonsters", this);
+ config.addListener("cycleNPC", this);
config.addListener("extMouseTargeting", this);
loadAttackList();
@@ -1034,8 +1035,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
int d = being->getDistance();
// logger->log("dist: %d", dist);
// logger->log("name: %s, %d, %d", being->getName().c_str(), (int)valid, d);
- if (being->getType() != type
- || !mTargetOnlyReachable)
+ if (being->getType() != Being::MONSTER || !mTargetOnlyReachable)
{ // if distance not calculated, use old distance
d = (being->getTileX() - x) * (being->getTileX() - x)
+ (being->getTileY() - y) * (being->getTileY() - y);