diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-02 00:28:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-02 00:28:21 +0300 |
commit | 2cff8f67ed362d0996610a7fd6f27b445afa521c (patch) | |
tree | 59b8f7a2f99911d37f5d1c88d70aa51ee31e1848 /src/gui | |
parent | 987141c4340c508b14ec085f977754bb48dcfe0e (diff) | |
download | manaverse-2cff8f67ed362d0996610a7fd6f27b445afa521c.tar.gz manaverse-2cff8f67ed362d0996610a7fd6f27b445afa521c.tar.bz2 manaverse-2cff8f67ed362d0996610a7fd6f27b445afa521c.tar.xz manaverse-2cff8f67ed362d0996610a7fd6f27b445afa521c.zip |
dehardcode shift key to stop mouse moving.
now it using stop attack and untarget actions for stop moving.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e210e043b..90ef086d2 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -288,7 +288,7 @@ void Viewport::_followMouse() // We create a mouse event and send it to mouseDragged. const uint8_t *const keys = SDL_GetKeyState(nullptr); gcn::MouseEvent mouseEvent(nullptr, - (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]), + 0, false, false, false, @@ -560,7 +560,9 @@ void Viewport::mouseDragged(gcn::MouseEvent &event) if (!mMap || !player_node) return; - if (mPlayerFollowMouse && !event.isShiftPressed()) + if (mPlayerFollowMouse && !inputManager.isActionActive( + Input::KEY_STOP_ATTACK) && !inputManager.isActionActive( + Input::KEY_UNTARGET)) { #ifdef MANASERV_SUPPORT if (Net::getNetworkType() == ServerInfo::MANASERV) |