summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
commit3d447679df26179b7ffa781c34f5277e6a1aec29 (patch)
tree242365d32770a89448130684ad7ed2bf00c22561 /src/gui/viewport.cpp
parent8c8f9f6cf53a6d5b8d9d72f4860921b3325a7696 (diff)
downloadmanaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.gz
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.bz2
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.xz
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.zip
Dont compile manaserv related code if manaserv support disabled.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index e34dd658a..9688c818a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -304,6 +304,7 @@ void Viewport::_drawDebugPath(Graphics *graphics)
_drawPath(graphics, debugPath);
}
+#ifdef MANASERV_SUPPORT
else if (Net::getNetworkType() == ServerInfo::MANASERV)
{
const Vector &playerPos = player_node->getPosition();
@@ -330,6 +331,7 @@ void Viewport::_drawDebugPath(Graphics *graphics)
// But also the one currently walked on.
_drawPath(graphics, player_node->getPath(), gcn::Color(0, 0, 255));
}
+#endif
}
void Viewport::_drawPath(Graphics *graphics, const Path &path,
@@ -353,6 +355,7 @@ void Viewport::_drawPath(Graphics *graphics, const Path &path,
}
}
}
+#ifdef MANASERV_SUPPORT
else if (Net::getNetworkType() == ServerInfo::MANASERV)
{
for (Path::const_iterator i = path.begin(); i != path.end(); ++i)
@@ -369,8 +372,8 @@ void Viewport::_drawPath(Graphics *graphics, const Path &path,
squareX + 4, squareY + 12, gcn::Graphics::CENTER);
}
}
-
}
+#endif
}
void Viewport::mousePressed(gcn::MouseEvent &event)
@@ -505,6 +508,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
if (mPlayerFollowMouse && !event.isShiftPressed())
{
+#ifdef MANASERV_SUPPORT
if (Net::getNetworkType() == ServerInfo::MANASERV)
{
if (get_elapsed_time(mLocalWalkTime) >= walkingMouseDelay)
@@ -519,6 +523,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
}
}
else
+#endif
{
if (mLocalWalkTime != player_node->getActionTime())
{