summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-05 21:47:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-05 21:48:19 +0300
commit17bb7a5de4b9406f1a02d092ae590ab71b7265ba (patch)
treed33a92e36abedc961627e150665d58f0a34440b4
parent8eb0fdb2f91bb49d1c4dabd9dccbeb25b2f4dd84 (diff)
downloadmanaverse-17bb7a5de4b9406f1a02d092ae590ab71b7265ba.tar.gz
manaverse-17bb7a5de4b9406f1a02d092ae590ab71b7265ba.tar.bz2
manaverse-17bb7a5de4b9406f1a02d092ae590ab71b7265ba.tar.xz
manaverse-17bb7a5de4b9406f1a02d092ae590ab71b7265ba.zip
Screen button cancel attack working also like sit if no target selected.
-rw-r--r--src/touchactions.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/touchactions.cpp b/src/touchactions.cpp
index 5f236ea4e..f0b46a31f 100644
--- a/src/touchactions.cpp
+++ b/src/touchactions.cpp
@@ -24,6 +24,7 @@
#include "being.h"
#include "game.h"
#include "keydata.h"
+#include "localplayer.h"
#include "logger.h"
#include "mouseinput.h"
#include "touchmanager.h"
@@ -156,6 +157,8 @@ impHandler(attackOut)
impHandler(cancelClick)
{
ActionManager::stopAttack(tempEvent);
+ if (!player_node->getTarget())
+ ActionManager::sit(tempEvent);
}
impHandler(cancelUp)