diff options
author | Daniel Bradshaw <daniel+commits@the-cell.co.uk> | 2010-01-31 13:14:07 +0000 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-01-31 17:50:29 +0100 |
commit | 2ff6ad2e8a67bd8ef34b56b866ef277c30135f19 (patch) | |
tree | 536497f63044441a6e8032209446d1c3213b9d55 /src/gui/viewport.cpp | |
parent | 22c75a346e029fad746b6aa0b123c886ddeb5c75 (diff) | |
download | mana-client-2ff6ad2e8a67bd8ef34b56b866ef277c30135f19.tar.gz mana-client-2ff6ad2e8a67bd8ef34b56b866ef277c30135f19.tar.bz2 mana-client-2ff6ad2e8a67bd8ef34b56b866ef277c30135f19.tar.xz mana-client-2ff6ad2e8a67bd8ef34b56b866ef277c30135f19.zip |
Unify eAthena and manaserv support in to one build.
Finish support for server types in the server dialog.
Using the new server type function, strip out ifdefs, replacing them with if
blocks for later merging in smaller atomic commits.
Remove any remaining references to the support defs, including in build system.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 11 |
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 + } } } |