diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-31 21:16:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-31 21:16:59 +0300 |
commit | 2ff2ea08e8d158961d4d38c06ba93c52b919026d (patch) | |
tree | b4a1753f2cac1bdae8632375ecedd150108e1aad /src/input/inputmanager.cpp | |
parent | 0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2 (diff) | |
download | plus-2ff2ea08e8d158961d4d38c06ba93c52b919026d.tar.gz plus-2ff2ea08e8d158961d4d38c06ba93c52b919026d.tar.bz2 plus-2ff2ea08e8d158961d4d38c06ba93c52b919026d.tar.xz plus-2ff2ea08e8d158961d4d38c06ba93c52b919026d.zip |
Add NOBLOCK input actions condition. This mean if player not blocked by special things like statuses.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r-- | src/input/inputmanager.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
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) |