summaryrefslogtreecommitdiff
path: root/src/actionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actionmanager.cpp')
-rw-r--r--src/actionmanager.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 10b51cb41..5c0bf85fd 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -663,14 +663,19 @@ impHandler0(pickup)
return false;
}
+static void doSit()
+{
+ if (inputManager.isActionActive(InputAction::EMOTE))
+ player_node->updateSit();
+ else
+ player_node->toggleSit();
+}
+
impHandler0(sit)
{
if (player_node)
{
- if (inputManager.isActionActive(InputAction::EMOTE))
- player_node->updateSit();
- else
- player_node->toggleSit();
+ doSit();
return true;
}
return false;
@@ -1147,10 +1152,8 @@ impHandler0(stopSit)
return false;
if (!player_node->getTarget())
{
- if (inputManager.isActionActive(InputAction::EMOTE))
- player_node->updateSit();
- else
- player_node->toggleSit();
+ doSit();
+ return true;
}
return true;
}