summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-05-03 23:57:06 +0300
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-05-04 11:48:09 +0200
commit22a7ac0b9ed82d09460d791016a990b327b61fc4 (patch)
treeec7868f14f6e06af9276a0cab45cf3cfd396a33d /src
parent5cc53c54b43e663e65b74e959543aa02a03cf2ea (diff)
downloadmana-22a7ac0b9ed82d09460d791016a990b327b61fc4.tar.gz
mana-22a7ac0b9ed82d09460d791016a990b327b61fc4.tar.bz2
mana-22a7ac0b9ed82d09460d791016a990b327b61fc4.tar.xz
mana-22a7ac0b9ed82d09460d791016a990b327b61fc4.zip
Fix mouse attack (tmwa)
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Diffstat (limited to 'src')
-rw-r--r--src/localplayer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 9729f55d..0b0e22f5 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1296,13 +1296,11 @@ bool LocalPlayer::withinAttackRange(Being *target)
}
else
{
- int dist_x = abs(target->getTileX() - getTileY());
- int dist_y = abs(target->getTileY() - getTileX());
+ int dist_x = abs(target->getTileX() - getTileX());
+ int dist_y = abs(target->getTileY() - getTileY());
if (dist_x > getAttackRange() || dist_y > getAttackRange())
- {
return false;
- }
return true;
}