From 129cdf162b2727c8854e0c6b79d2e79906e5dcfb Mon Sep 17 00:00:00 2001 From: Bertram Date: Tue, 22 Sep 2009 01:03:44 +0200 Subject: An attempt to fix the mouse ignoring collisions in TMWserv. --- src/localplayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2