diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-25 18:38:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-25 18:38:52 +0300 |
commit | 3d447679df26179b7ffa781c34f5277e6a1aec29 (patch) | |
tree | 242365d32770a89448130684ad7ed2bf00c22561 /src/gui/viewport.cpp | |
parent | 8c8f9f6cf53a6d5b8d9d72f4860921b3325a7696 (diff) | |
download | plus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.gz plus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.bz2 plus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.xz plus-3d447679df26179b7ffa781c34f5277e6a1aec29.zip |
Dont compile manaserv related code if manaserv support disabled.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 7 |
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()) { |