From f27cdadb625076b196349f738cb2ca03e7d88e32 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 8 May 2025 23:53:20 +0000 Subject: findBeing[s]ByPixel: return dead players for popupmenu use. Dead players have to be returned so you can still see their equipment, do whisper or trade (yes you can trade with the dead :D) or use any other option in the menu. **** mana/plus!174 --- src/actormanager.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 73248cab3..9e754cae6 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -473,7 +473,6 @@ Being *ActorManager::findBeingByPixel(const int x, const int y, if (mMap == nullptr) return nullptr; - const bool targetDead = mTargetDeadPlayers; const bool modActive = inputManager.isActionActive( InputAction::STOP_ATTACK); @@ -518,8 +517,10 @@ Being *ActorManager::findBeingByPixel(const int x, const int y, continue; } - if ((being->mAction != BeingAction::DEAD || - (targetDead && being->getType() == ActorType::Player)) && + // dead players have to be returned so you can still see + // their equipment, do whisper or trade (yes you can trade + // with the dead :D) or use any other option in the menu. + if ((being->isAlive() || being->getType() == ActorType::Player) && (allPlayers == AllPlayers_true || being != localPlayer)) { const int px = being->getPixelX(); @@ -636,11 +637,11 @@ void ActorManager::findBeingsByPixel(STD_VECTOR &beings, { continue; } - if ((being->isAlive() || - (mTargetDeadPlayers && - actorType == ActorType::Player)) && - (allPlayers == AllPlayers_true || - being != localPlayer)) + // dead players have to be returned so you can still see + // their equipment, do whisper or trade (yes you can trade + // with the dead :D) or use any other option in the menu. + if ((being->isAlive() || actorType == ActorType::Player) && + (allPlayers == AllPlayers_true || being != localPlayer)) { if ((actor->getPixelX() - xtol <= x) && (actor->getPixelX() + xtol > x) && -- cgit v1.2.3-70-g09d2