diff options
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; +} + } |