summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-06 16:29:31 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-06 16:29:31 +0300
commit5b0c6c5c95645813f96ea413b1c14f2ffc18a481 (patch)
tree15f9a59ac6c585a2391ab5713f8ce2261a105928 /src/actormanager.cpp
parent7fa78a35307227453ab55c7452e348a40cd41d65 (diff)
downloadplus-5b0c6c5c95645813f96ea413b1c14f2ffc18a481.tar.gz
plus-5b0c6c5c95645813f96ea413b1c14f2ffc18a481.tar.bz2
plus-5b0c6c5c95645813f96ea413b1c14f2ffc18a481.tar.xz
plus-5b0c6c5c95645813f96ea413b1c14f2ffc18a481.zip
Add strong typed bool type AllPlayers.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 7a074661d..1df31fbeb 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -359,7 +359,7 @@ Being *ActorManager::findBeing(const int x, const int y,
}
Being *ActorManager::findBeingByPixel(const int x, const int y,
- const bool allPlayers) const
+ const AllPlayers allPlayers) const
{
if (!mMap)
return nullptr;
@@ -410,7 +410,7 @@ Being *ActorManager::findBeingByPixel(const int x, const int y,
if ((being->mAction != BeingAction::DEAD
|| (targetDead && being->getType() == ActorType::Player))
- && (allPlayers || being != localPlayer))
+ && (allPlayers == AllPlayers_true || being != localPlayer))
{
const int px = being->getPixelX();
const int py = being->getPixelY();
@@ -476,7 +476,7 @@ Being *ActorManager::findBeingByPixel(const int x, const int y,
void ActorManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
const int x, const int y,
- const bool allPlayers) const
+ const AllPlayers allPlayers) const
{
if (!mMap)
return;
@@ -506,7 +506,7 @@ void ActorManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
if ((being && (being->isAlive()
|| (mTargetDeadPlayers && being->getType() == ActorType::Player))
- && (allPlayers || being != localPlayer))
+ && (allPlayers == AllPlayers_true || being != localPlayer))
|| actor->getType() == ActorType::FloorItem)
{
if ((actor->getPixelX() - xtol <= x) &&