From 21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 May 2015 17:00:00 +0300 Subject: Add strong typed bool type AllowSort. --- src/actormanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/actormanager.cpp') diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 1df31fbeb..e32eda6f1 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -891,13 +891,13 @@ Being *ActorManager::findNearestLivingBeing(const int x, const int y, type, x, y, excluded, - true); + AllowSort_true); } Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, const int maxDist, const ActorType::Type type, - const bool allowSort) const + const AllowSort allowSort) const { if (!aroundBeing) return nullptr; @@ -916,7 +916,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, const ActorType::Type &type, const int x, const int y, const Being *const excluded, - const bool allowSort) const + const AllowSort allowSort) const { if (!aroundBeing || !localPlayer) return nullptr; @@ -939,12 +939,12 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, maxDist = maxDist * maxDist; - const bool cycleSelect = allowSort + const bool cycleSelect = allowSort == AllowSort_true && ((mCyclePlayers && type == ActorType::Player) || (mCycleMonsters && type == ActorType::Monster) || (mCycleNPC && type == ActorType::Npc)); - const bool filtered = allowSort + const bool filtered = allowSort == AllowSort_true && config.getBoolValue("enableAttackFilter") && type == ActorType::Monster; const bool modActive = inputManager.isActionActive( -- cgit v1.2.3-60-g2f50