diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-25 16:44:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-25 16:48:32 +0300 |
commit | fd6f7a8fec07920c5941c5010e086f4bb449404e (patch) | |
tree | 81c28be92e47f254347943b0b54395cd7f315faf /src/actionmanager.cpp | |
parent | 64dee3d773e380079f3abfd1dfaae04976de84e3 (diff) | |
download | ManaVerse-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.gz ManaVerse-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.bz2 ManaVerse-fd6f7a8fec07920c5941c5010e086f4bb449404e.tar.xz ManaVerse-fd6f7a8fec07920c5941c5010e086f4bb449404e.zip |
Add new action "stop or sit"
Diffstat (limited to 'src/actionmanager.cpp')
-rw-r--r-- | src/actionmanager.cpp | 20 |
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; +} + } |