summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 2ed7deb9..76bf5a22 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -37,6 +37,8 @@
#include "gui/ministatus.h"
#include "gui/popupmenu.h"
+#include "net/net.h"
+
#include "resources/monsterinfo.h"
#include "resources/resourcemanager.h"
@@ -411,7 +413,8 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
if (mPlayerFollowMouse && !event.isShiftPressed())
{
-#ifdef MANASERV_SUPPORT
+ if (Net::getNetworkType() == ServerInfo::MANASERV)
+ {
if (get_elapsed_time(mLocalWalkTime) >= walkingMouseDelay)
{
mLocalWalkTime = tick_time;
@@ -419,7 +422,9 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
event.getY() + (int) mPixelViewY);
player_node->pathSetByMouse();
}
-#else
+ }
+ else
+ {
if (mLocalWalkTime != player_node->getWalkTime())
{
mLocalWalkTime = player_node->getWalkTime();
@@ -427,7 +432,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
int destY = event.getY() / 32 + mTileViewY;
player_node->setDestination(destX, destY);
}
-#endif
+ }
}
}