diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-21 20:30:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-21 20:30:08 +0300 |
commit | f59b0da2f59aff64802e0211ceaa67e50e85e05c (patch) | |
tree | 9f3f198827b5a5209bfa2bd154c7b79c7f53bc33 /src/actions/actions.cpp | |
parent | 6bedc289455528fe609f492cd9f1a0c352d981bb (diff) | |
download | plus-f59b0da2f59aff64802e0211ceaa67e50e85e05c.tar.gz plus-f59b0da2f59aff64802e0211ceaa67e50e85e05c.tar.bz2 plus-f59b0da2f59aff64802e0211ceaa67e50e85e05c.tar.xz plus-f59b0da2f59aff64802e0211ceaa67e50e85e05c.zip |
Move target related actions into separate file.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r-- | src/actions/actions.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 926b0e48a..4fb6c7e1d 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -427,41 +427,6 @@ impHandler0(targetAttack) return false; } -static bool setTarget(const ActorType::Type type, const bool allowSort) -{ - if (actorManager && localPlayer) - { - Being *const target = actorManager->findNearestLivingBeing( - localPlayer, 20, type, allowSort); - - if (target && target != localPlayer->getTarget()) - localPlayer->setTarget(target); - - return true; - } - return false; -} - -impHandler0(targetPlayer) -{ - return setTarget(ActorType::PLAYER, true); -} - -impHandler0(targetMonster) -{ - return setTarget(ActorType::MONSTER, true); -} - -impHandler0(targetClosestMonster) -{ - return setTarget(ActorType::MONSTER, false); -} - -impHandler0(targetNPC) -{ - return setTarget(ActorType::NPC, true); -} - impHandler0(safeVideoMode) { if (mainGraphics) |