diff options
author | No Name <remoit(DOT)nane(AT)gmail(DOT)com> | 2010-04-22 05:41:08 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-22 20:58:23 -0600 |
commit | 4fb390a44431f3984cf21a4b719803a1977593c2 (patch) | |
tree | 6342ad006823c314732223fcb0e9066424717b26 /src/beingmanager.h | |
parent | 93d4de19fdffb6d568c907729449f169c3520c7b (diff) | |
download | mana-4fb390a44431f3984cf21a4b719803a1977593c2.tar.gz mana-4fb390a44431f3984cf21a4b719803a1977593c2.tar.bz2 mana-4fb390a44431f3984cf21a4b719803a1977593c2.tar.xz mana-4fb390a44431f3984cf21a4b719803a1977593c2.zip |
Fix keyboard target selection to allow player targeting
Modifies BeingManager::findNearestLivingBeing() behaviour to exclude an
optional being from the search.
Signed-off-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src/beingmanager.h')
-rw-r--r-- | src/beingmanager.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/beingmanager.h b/src/beingmanager.h index d81db668..7fd63afe 100644 --- a/src/beingmanager.h +++ b/src/beingmanager.h @@ -75,9 +75,11 @@ class BeingManager * @param maxTileDist Maximal distance in tiles. If minimal distance is * larger, no being is returned. * @param type The type of being to look for. + * @param excluded The being to exclude from the search. */ Being *findNearestLivingBeing(int x, int y, int maxTileDist, - Being::Type type = Being::UNKNOWN) const; + Being::Type type = Being::UNKNOWN, + Being *excluded = 0) const; /** * Returns a being nearest to another being. @@ -88,7 +90,7 @@ class BeingManager * @param type The type of being to look for. */ Being *findNearestLivingBeing(Being *aroundBeing, int maxTileDist, - Being::Type type = Being::UNKNOWN) const; + Being::Type type = Being::UNKNOWN) const; /** * Finds a being by name and (optionally) by type. |