summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2008-02-12 19:49:37 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2008-02-12 19:49:37 +0000
commit79dfa4db0cc7d307fe52f1959a30f117efacaa00 (patch)
treec44cd018b8f9f320fb2a1f0c8aed47a24ac14e2b /src/localplayer.cpp
parent34e9c3e9125ef800ef47e2594cf23853deddccfb (diff)
downloadmana-79dfa4db0cc7d307fe52f1959a30f117efacaa00.tar.gz
mana-79dfa4db0cc7d307fe52f1959a30f117efacaa00.tar.bz2
mana-79dfa4db0cc7d307fe52f1959a30f117efacaa00.tar.xz
mana-79dfa4db0cc7d307fe52f1959a30f117efacaa00.zip
Made pathfinding not halt on collision destination tile, made moving around with mouse smoother. Added possibility to pass through players with key controls.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 1b65d9bb..3b8dda9e 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -223,11 +223,11 @@ void LocalPlayer::walk(unsigned char dir)
dy = 0;
// Choose a straight direction when diagonal target is blocked
- if (dx && dy && !mMap->getWalk(mX + dx, mY + dy))
+ if (dx && dy && mMap->tileCollides(mX + dx, mY + dy))
dx = 0;
// Walk to where the player can actually go
- if ((dx || dy) && mMap->getWalk(mX + dx, mY + dy))
+ if ((dx || dy) && !mMap->tileCollides(mX + dx, mY + dy))
{
setDestination(mX + dx, mY + dy);
}