summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-28 18:47:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-28 18:47:27 +0300
commit4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7 (patch)
tree81e17de542862518b5d69502ee83320f0127696e
parentb336adc59f3f65ef5c1fe7062e892fbd732cdec5 (diff)
downloadplus-4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7.tar.gz
plus-4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7.tar.bz2
plus-4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7.tar.xz
plus-4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7.zip
Allow change pet direction by pet emote key + move keys.
-rw-r--r--src/actions/move.cpp9
-rw-r--r--src/game.cpp6
2 files changed, 14 insertions, 1 deletions
diff --git a/src/actions/move.cpp b/src/actions/move.cpp
index c75d24c36..449a3927a 100644
--- a/src/actions/move.cpp
+++ b/src/actions/move.cpp
@@ -23,6 +23,7 @@
#include "game.h"
#include "actions/actiondef.h"
+#include "actions/pets.h"
#include "being/localplayer.h"
@@ -61,6 +62,8 @@ impHandler(moveUp)
{
if (inputManager.isActionActive(InputAction::EMOTE))
return directUp(event);
+ else if (inputManager.isActionActive(InputAction::PET_EMOTE))
+ return petDirectUp(event);
if (popupMenu->isPopupVisible())
{
popupMenu->moveUp();
@@ -73,6 +76,8 @@ impHandler(moveDown)
{
if (inputManager.isActionActive(InputAction::EMOTE))
return directDown(event);
+ else if (inputManager.isActionActive(InputAction::PET_EMOTE))
+ return petDirectDown(event);
if (popupMenu->isPopupVisible())
{
popupMenu->moveDown();
@@ -92,6 +97,8 @@ impHandler(moveLeft)
}
if (inputManager.isActionActive(InputAction::EMOTE))
return directLeft(event);
+ else if (inputManager.isActionActive(InputAction::PET_EMOTE))
+ return petDirectLeft(event);
return closeMoveNpcDialog(false);
}
@@ -106,6 +113,8 @@ impHandler(moveRight)
}
if (inputManager.isActionActive(InputAction::EMOTE))
return directRight(event);
+ else if (inputManager.isActionActive(InputAction::PET_EMOTE))
+ return petDirectRight(event);
return closeMoveNpcDialog(false);
}
diff --git a/src/game.cpp b/src/game.cpp
index 51d9cab9c..1657192bb 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -870,8 +870,12 @@ void Game::handleMove()
localPlayer->cancelFollow();
}
- if (!inputManager.isActionActive(InputAction::EMOTE) || direction == 0)
+ if ((!inputManager.isActionActive(InputAction::EMOTE)
+ && !inputManager.isActionActive(InputAction::PET_EMOTE))
+ || direction == 0)
+ {
moveInDirection(direction);
+ }
}
BLOCK_END("Game::handleMove")
}