From 17bb7a5de4b9406f1a02d092ae590ab71b7265ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Dec 2012 21:47:27 +0300 Subject: Screen button cancel attack working also like sit if no target selected. --- src/touchactions.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3-70-g09d2