diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 9 |
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); |