From 2cff8f67ed362d0996610a7fd6f27b445afa521c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 2 Sep 2013 00:28:21 +0300 Subject: dehardcode shift key to stop mouse moving. now it using stop attack and untarget actions for stop moving. --- src/gui/viewport.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-60-g2f50