summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-11 01:47:14 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-11 01:51:41 +0300
commita54f29e3313c2eb60369055731b0f50bd2ff20a3 (patch)
tree4d0c59fb180063f9e0933a2c6ee61bc387609d87 /src/inputmanager.cpp
parent9be7d0ac1127477a5ff5ffb3fb3dd45487eec213 (diff)
downloadmanaplus-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.gz
manaplus-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.bz2
manaplus-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.xz
manaplus-a54f29e3313c2eb60369055731b0f50bd2ff20a3.zip
Convert attack handling code to new format.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp6
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;
}