summaryrefslogtreecommitdiff
path: root/src/actionmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 16:44:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 16:48:32 +0300
commitfd6f7a8fec07920c5941c5010e086f4bb449404e (patch)
tree81c28be92e47f254347943b0b54395cd7f315faf /src/actionmanager.cpp
parent64dee3d773e380079f3abfd1dfaae04976de84e3 (diff)
downloadplus-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.gz
plus-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.bz2
plus-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.xz
plus-fd6f7a8fec07920c5941c5010e086f4bb449404e.zip
Add new action "stop or sit"
Diffstat (limited to 'src/actionmanager.cpp')
-rw-r--r--src/actionmanager.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index f41a9269c..92087b6db 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -1045,4 +1045,24 @@ impHandler0(safeVideoMode)
return true;
}
+impHandler0(stopSit)
+{
+ if (player_node)
+ {
+ player_node->stopAttack();
+ // not consume if target attack key pressed
+ if (inputManager.isActionActive(Input::KEY_TARGET_ATTACK))
+ return false;
+ if (!player_node->getTarget())
+ {
+ if (inputManager.isActionActive(Input::KEY_EMOTE))
+ player_node->updateSit();
+ else
+ player_node->toggleSit();
+ }
+ return true;
+ }
+ return false;
+}
+
}