From 5b0c6c5c95645813f96ea413b1c14f2ffc18a481 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 May 2015 16:29:31 +0300 Subject: Add strong typed bool type AllPlayers. --- src/actormanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/actormanager.cpp') 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 &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 &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) && -- cgit v1.2.3-70-g09d2