diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 17:31:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 17:31:34 +0300 |
commit | efba340a17ae21ca0aaa1cdba8e24265882f1eba (patch) | |
tree | 7905769c8a35cb61b853d9095e16abee26f2bf92 | |
parent | e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6 (diff) | |
download | manaverse-efba340a17ae21ca0aaa1cdba8e24265882f1eba.tar.gz manaverse-efba340a17ae21ca0aaa1cdba8e24265882f1eba.tar.bz2 manaverse-efba340a17ae21ca0aaa1cdba8e24265882f1eba.tar.xz manaverse-efba340a17ae21ca0aaa1cdba8e24265882f1eba.zip |
Fix non cycle players selection.
Fix npc cycle selection after changing settings.
-rw-r--r-- | src/actorspritemanager.cpp | 4 |
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); |