diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-05-08 23:53:20 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-05-08 23:53:20 +0000 |
commit | f27cdadb625076b196349f738cb2ca03e7d88e32 (patch) | |
tree | 0aea0806b37b6dbe6af39b1a000af3935296d117 /src | |
parent | 90c0edf36e9546085cc570d48aca286976744f2d (diff) | |
download | manaplus-f27cdadb625076b196349f738cb2ca03e7d88e32.tar.gz manaplus-f27cdadb625076b196349f738cb2ca03e7d88e32.tar.bz2 manaplus-f27cdadb625076b196349f738cb2ca03e7d88e32.tar.xz manaplus-f27cdadb625076b196349f738cb2ca03e7d88e32.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/actormanager.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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<ActorSprite*> &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) && |