diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-11 01:47:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-11 01:51:41 +0300 |
commit | a54f29e3313c2eb60369055731b0f50bd2ff20a3 (patch) | |
tree | 4d0c59fb180063f9e0933a2c6ee61bc387609d87 /src/inputmanager.cpp | |
parent | 9be7d0ac1127477a5ff5ffb3fb3dd45487eec213 (diff) | |
download | manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.gz manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.bz2 manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.xz manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.zip |
Convert attack handling code to new format.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r-- | src/inputmanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index 12993c0cb..8a9e89995 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -521,7 +521,7 @@ int InputManager::getInputConditionMask() if (Game::instance()->getValidSpeed()) mask += COND_VALIDSPEED; - if (!gui->getFocusHandler()->getModalFocused()) + if (gui && !gui->getFocusHandler()->getModalFocused()) mask += COND_NOMODAL; NpcDialog *dialog = NpcDialog::getActive(); @@ -536,6 +536,10 @@ int InputManager::getInputConditionMask() { mask += COND_NOTARGET; } + + if (!player_node || player_node->getFollow().empty()) + mask += COND_NOFOLLOW; + return mask; } |