From 3d447679df26179b7ffa781c34f5277e6a1aec29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Apr 2011 18:38:52 +0300 Subject: Dont compile manaserv related code if manaserv support disabled. --- src/gui/viewport.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/viewport.cpp') 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()) { -- cgit v1.2.3-60-g2f50