summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-02 06:38:17 -0700
committerJared Adams <jaxad0127@gmail.com>2009-03-02 06:38:17 -0700
commit646cc317351d60e0fefcab789248310662fcbbc8 (patch)
treea382089f127c8044bb6f5ce3dc1242a0c17b437d
parentf1fd493e561f30df91badf0665f92dbce861da0a (diff)
downloadmana-646cc317351d60e0fefcab789248310662fcbbc8.tar.gz
mana-646cc317351d60e0fefcab789248310662fcbbc8.tar.bz2
mana-646cc317351d60e0fefcab789248310662fcbbc8.tar.xz
mana-646cc317351d60e0fefcab789248310662fcbbc8.zip
Only auto target monsters
Also, increase auto target range to 20 tiles
-rw-r--r--src/game.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 7a7ff53c..40bfd5e4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -839,12 +839,9 @@ void Game::handleInput()
default: break;
}
- // Attack priorioty is: Monster, Player, auto target
- target = beingManager->findBeing(targetX, targetY,
- Being::MONSTER);
- if (!target)
- target = beingManager->findBeing(targetX, targetY,
- Being::PLAYER);
+ // Only auto target Monsters
+ target = beingManager->findNearestLivingBeing(targetX, targetY,
+ 20, Being::MONSTER);
}
player_node->attack(target, newTarget);