From efba340a17ae21ca0aaa1cdba8e24265882f1eba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 17:31:34 +0300 Subject: Fix non cycle players selection. Fix npc cycle selection after changing settings. --- src/actorspritemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/actorspritemanager.cpp') 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); -- cgit v1.2.3-70-g09d2