summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-06 17:00:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-06 17:00:00 +0300
commit21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c (patch)
tree2e366420e85c18fc4c687cc7ab5d1dd2f46df365 /src/actormanager.cpp
parent5b0c6c5c95645813f96ea413b1c14f2ffc18a481 (diff)
downloadmv-21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c.tar.gz
mv-21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c.tar.bz2
mv-21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c.tar.xz
mv-21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c.zip
Add strong typed bool type AllowSort.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp10
1 files changed, 5 insertions, 5 deletions
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(