From b823889f1747bbceb61273f7a7383580c4b034e3 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 18 Jan 2010 09:14:36 +0100 Subject: Unified BeingManager::findNearestLivingBeing for eAthena and manaserv It now always works with pixels. --- src/game.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index c8f976a2..9ca58461 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -980,19 +980,14 @@ void Game::handleInput() if (keyboard.isKeyActive(keyboard.KEY_TARGET_ATTACK)) { - Being *target = NULL; + Being *target = 0; bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET); // A set target has highest priority if (!player_node->getTarget()) { -#ifdef MANASERV_SUPPORT - Uint16 targetX = x / 32, targetY = y / 32; -#else - Uint16 targetX = x, targetY = y; -#endif // Only auto target Monsters - target = beingManager->findNearestLivingBeing(targetX, targetY, + target = beingManager->findNearestLivingBeing(player_node, 20, Being::MONSTER); } player_node->attack(target, newTarget); -- cgit v1.2.3-60-g2f50