diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/inputcondition.h | 7 | ||||
-rw-r--r-- | src/input/inputmanager.cpp | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/input/inputcondition.h b/src/input/inputcondition.h index 2f44570a7..87be3e957 100644 --- a/src/input/inputcondition.h +++ b/src/input/inputcondition.h @@ -35,14 +35,15 @@ namespace InputCondition NONPCINPUT = 128, // npc input field inactive EMODS = 256, // game modifiers enabled NOTARGET = 512, // no target/untarget keys - // pressed + // pressed NOFOLLOW = 1024, // follow mode disabled INGAME = 2048, // game must be started NOBUYSELL = 4096, // no active buy or sell dialogs NONPCDIALOG = 8192, // no active npc dialog or - // dialog almost closed + // dialog almost closed NOTALKING = 16384, // player have no opened - // dialogs what prevent moving + // dialogs what prevent moving + ALIVE = 32768, // player alive 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 diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 83e01d0ba..e551d37f2 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -715,6 +715,9 @@ void InputManager::updateConditionMask() if (!localPlayer || localPlayer->getFollow().empty()) mMask |= InputCondition::NOFOLLOW; + + if (localPlayer && localPlayer->isAlive()) + mMask |= InputCondition::ALIVE; } bool InputManager::checkKey(const InputActionData *const key) const |