summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 23:09:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 23:09:44 +0300
commit1c7c54e8102f1f449ffe7dfaa3a041915079d290 (patch)
tree3da90ea7e18d4c4a6fe2f0eb4c76718dc3e489f5 /src/actormanager.cpp
parent467455bf7907411918d8fb6f4113eb95df443a29 (diff)
downloadmanaplus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.gz
manaplus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.bz2
manaplus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.xz
manaplus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.zip
fix code style.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index f8d4e137e..265c60e17 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1038,7 +1038,8 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing,
const bool valid = validateBeing(aroundBeing, being,
type, excluded, 50);
int d = being->getDistance();
- if (being->getType() != ActorType::MONSTER || !mTargetOnlyReachable)
+ if (being->getType() != ActorType::MONSTER
+ || !mTargetOnlyReachable)
{ // if distance not calculated, use old distance
d = (being->getTileX() - x) * (being->getTileX() - x)
+ (being->getTileY() - y) * (being->getTileY() - y);