summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/inputactionmap.h2
-rw-r--r--src/input/inputcondition.h4
-rw-r--r--src/input/inputmanager.cpp19
3 files changed, 19 insertions, 6 deletions
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 2f6626799..f3e75ed40 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -263,7 +263,7 @@ static const InputActionData inputActionData
Input::GRP_DEFAULT,
&Actions::sit,
InputAction::NO_VALUE, 50,
- InputCondition::GAME | InputCondition::NOTARGET,
+ InputCondition::GAME | InputCondition::NOTARGET | InputCondition::NOBLOCK,
"sit",
UseArgs_false,
Protected_false},
diff --git a/src/input/inputcondition.h b/src/input/inputcondition.h
index 5687b6f6a..0f6e4cb6d 100644
--- a/src/input/inputcondition.h
+++ b/src/input/inputcondition.h
@@ -46,11 +46,13 @@ namespace InputCondition
ALIVE = 32768, // player alive
NOVENDING = 65536, // vending disabled
NOROOM = 131072, // not joined room
+ NOBLOCK = 262144, // no blocked move (trick dead)
SHORTCUT = 2 + 4 + 16 + 512 + 2048, // flags for shortcut keys
SHORTCUT0 = 2 + 4 + 16 + 512, // flags for shortcut keys
GAME = 2 + 4 + 8 + 16 + 64 + 2048, // main game key
GAME2 = 2 + 8 + 16 + 64 + 2048,
- ARROWKEYS = 2 + 4 + 8 + 16 + 64 + 2048 + 4096 + 16384 + 65536 + 131072
+ ARROWKEYS = 2 + 4 + 8 + 16 + 64 + 2048 + 4096 +
+ 16384 + 65536 + 131072 + 262144
};
} // namespace InputCondition
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 27d15a366..59fd1ff2d 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -732,11 +732,22 @@ void InputManager::updateConditionMask()
if (Game::instance())
mMask |= InputCondition::INGAME;
- if (!localPlayer || localPlayer->getFollow().empty())
- mMask |= InputCondition::NOFOLLOW;
+ if (localPlayer)
+ {
+ if (localPlayer->getFollow().empty())
+ mMask |= InputCondition::NOFOLLOW;
- if (localPlayer && localPlayer->isAlive())
- mMask |= InputCondition::ALIVE;
+ if (!localPlayer->isTrickDead())
+ mMask |= InputCondition::NOBLOCK;
+
+ if (localPlayer->isAlive())
+ mMask |= InputCondition::ALIVE;
+ }
+ else
+ {
+ mMask |= InputCondition::NOFOLLOW;
+ mMask |= InputCondition::NOBLOCK;
+ }
#endif
if (!settings.awayMode)