diff options
author | Bertram <bertram@cegetel.net> | 2009-09-22 01:03:44 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-09-22 01:03:44 +0200 |
commit | 129cdf162b2727c8854e0c6b79d2e79906e5dcfb (patch) | |
tree | 241fc216c7ff3f1081767cf54552796304a3eb70 | |
parent | bf6e1331941daecb3c3ff12c3b86457899042953 (diff) | |
download | Mana-129cdf162b2727c8854e0c6b79d2e79906e5dcfb.tar.gz Mana-129cdf162b2727c8854e0c6b79d2e79906e5dcfb.tar.bz2 Mana-129cdf162b2727c8854e0c6b79d2e79906e5dcfb.tar.xz Mana-129cdf162b2727c8854e0c6b79d2e79906e5dcfb.zip |
An attempt to fix the mouse ignoring collisions in TMWserv.
-rw-r--r-- | src/localplayer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 7cd6b889..635f7d04 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -500,6 +500,11 @@ void LocalPlayer::setDestination(Uint16 x, Uint16 y) #endif { #ifdef TMWSERV_SUPPORT + // Check the walkability of the destination + // If the destination is a wall, don't go there! + if (!mMap->getWalk(x / 32, y / 32)) + return; + // Fix coordinates so that the player does not seem to dig into walls. const int tx = x / 32; const int ty = y / 32; |