summaryrefslogtreecommitdiff
path: root/src/actormanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/actormanager.h')
-rw-r--r--src/actormanager.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/actormanager.h b/src/actormanager.h
index bea1267d1..2be782c45 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -1,11 +1,11 @@
/*
- * The ManaPlus Client
+ * The ManaVerse Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2011-2020 The ManaPlus Developers
- * Copyright (C) 2020-2023 The ManaVerse Developers
+ * Copyright (C) 2020-2025 The ManaVerse Developers
*
- * This file is part of The ManaPlus Client.
+ * This file is part of The ManaVerse Client.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -136,14 +136,25 @@ class ActorManager final : public ConfigListener
const ActorTypeT type) const A_WARN_UNUSED;
/**
- * Returns a being at the specific pixel.
+ * Returns a being roughly under the specified pixel (or nullptr).
+ *
+ * if Extended Mouse Targetting is enabled and no being is found
+ * using the usual tolerance, then a larger tolerance will be used.
+ *
+ * @param x,y pixel position
+ * @param allPlayers true to include localPlayer (ignored when
+ * Extended mouse targetting is disabled)
*/
Being *findBeingByPixel(const int x, const int y,
const AllPlayers allPlayers)
const A_WARN_UNUSED;
/**
- * Returns a beings at the specific pixel.
+ * Returns beings roughly under the specified pixel.
+ *
+ * @param beings return vector of beings found under pixel.
+ * @param x,y pixel position
+ * @param allPlayers true to include localPlayer
*/
void findBeingsByPixel(STD_VECTOR<ActorSprite*> &beings,
const int x, const int y,
@@ -295,7 +306,7 @@ class ActorManager final : public ConfigListener
const int y2,
const bool serverBuggy) const;
- bool pickUpNearest(const int x, const int y, int maxdist) const;
+ bool pickUpNearest(const int x, const int y, const int maxDist) const;
void optionChanged(const std::string &name) override final;
@@ -393,6 +404,20 @@ class ActorManager final : public ConfigListener
#ifndef UNITTESTS
protected:
#endif // UNITTESTS
+ /*
+ * General checks if a being is valid for selection.
+ * Additionally, localPlayer is checked to exist
+ *
+ * @param aroundBeing being must not equal this one
+ * @param being being under scrutiny. Nullptr check performed
+ * it must be alive unless a player and
+ * mTargetDeadPlayers is true.
+ * @param type pass ActorType::Unknown if no matching desired
+ * @param exluded being must not equal this one
+ * @param maxCost allowed max pathfinder distance, if applicable
+ * (only if being is a monster and
+ * mTargetOnlyReachable is true)
+ */
bool validateBeing(const Being *const aroundBeing,
Being *const being,
const ActorTypeT &type,