diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-02 19:36:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-02 19:36:00 +0300 |
commit | 3fa501670bfd9c592768bc736a257d4c93e42599 (patch) | |
tree | 9580f4b49e6d622fbb5cff986eda81cea18ba88f | |
parent | f924674239571a40b0806136a49b4da3edcadbbf (diff) | |
download | mv-3fa501670bfd9c592768bc736a257d4c93e42599.tar.gz mv-3fa501670bfd9c592768bc736a257d4c93e42599.tar.bz2 mv-3fa501670bfd9c592768bc736a257d4c93e42599.tar.xz mv-3fa501670bfd9c592768bc736a257d4c93e42599.zip |
Add player alive input flag.
-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 |