diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-01-18 09:14:36 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-01-18 09:14:36 +0100 |
commit | b823889f1747bbceb61273f7a7383580c4b034e3 (patch) | |
tree | e86c37728c0fdd991ed18f101092c07b03b7e918 /src/game.cpp | |
parent | 6eb2e01ef6943e4f8ef7cc32ec325e3c22b1f5ec (diff) | |
download | mana-b823889f1747bbceb61273f7a7383580c4b034e3.tar.gz mana-b823889f1747bbceb61273f7a7383580c4b034e3.tar.bz2 mana-b823889f1747bbceb61273f7a7383580c4b034e3.tar.xz mana-b823889f1747bbceb61273f7a7383580c4b034e3.zip |
Unified BeingManager::findNearestLivingBeing for eAthena and manaserv
It now always works with pixels.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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); |