From ce2bd403c4d9297768d67ec615c2748fe4674333 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 29 Dec 2014 16:48:19 +0300 Subject: Allow move pet by mod key (left shift) + move keys. --- src/actions/move.cpp | 8 ++++++++ src/game.cpp | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/actions/move.cpp b/src/actions/move.cpp index 449a3927a..bc03d7c0a 100644 --- a/src/actions/move.cpp +++ b/src/actions/move.cpp @@ -64,6 +64,8 @@ impHandler(moveUp) return directUp(event); else if (inputManager.isActionActive(InputAction::PET_EMOTE)) return petDirectUp(event); + else if (inputManager.isActionActive(InputAction::STOP_ATTACK)) + return petMoveUp(event); if (popupMenu->isPopupVisible()) { popupMenu->moveUp(); @@ -78,6 +80,8 @@ impHandler(moveDown) return directDown(event); else if (inputManager.isActionActive(InputAction::PET_EMOTE)) return petDirectDown(event); + else if (inputManager.isActionActive(InputAction::STOP_ATTACK)) + return petMoveDown(event); if (popupMenu->isPopupVisible()) { popupMenu->moveDown(); @@ -99,6 +103,8 @@ impHandler(moveLeft) return directLeft(event); else if (inputManager.isActionActive(InputAction::PET_EMOTE)) return petDirectLeft(event); + else if (inputManager.isActionActive(InputAction::STOP_ATTACK)) + return petMoveLeft(event); return closeMoveNpcDialog(false); } @@ -115,6 +121,8 @@ impHandler(moveRight) return directRight(event); else if (inputManager.isActionActive(InputAction::PET_EMOTE)) return petDirectRight(event); + else if (inputManager.isActionActive(InputAction::STOP_ATTACK)) + return petMoveRight(event); return closeMoveNpcDialog(false); } diff --git a/src/game.cpp b/src/game.cpp index 1657192bb..7a5bd7fd2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -871,7 +871,8 @@ void Game::handleMove() } if ((!inputManager.isActionActive(InputAction::EMOTE) - && !inputManager.isActionActive(InputAction::PET_EMOTE)) + && !inputManager.isActionActive(InputAction::PET_EMOTE) + && !inputManager.isActionActive(InputAction::STOP_ATTACK)) || direction == 0) { moveInDirection(direction); -- cgit v1.2.3-60-g2f50