From f59b0da2f59aff64802e0211ceaa67e50e85e05c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 Aug 2014 20:30:08 +0300 Subject: Move target related actions into separate file. --- src/actions/actions.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'src/actions/actions.cpp') 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) -- cgit v1.2.3-70-g09d2