summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-13 12:12:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-13 12:12:10 +0300
commitb863927543393468a7153775c18ef04a59f20a7f (patch)
tree56e6d7345598c0524ac4fd7310f6a85d465ce2c3 /src/game.cpp
parent6fcb5c4b9f03dd3e4b9fea0475aec2c21a8510bc (diff)
downloadplus-b863927543393468a7153775c18ef04a59f20a7f.tar.gz
plus-b863927543393468a7153775c18ef04a59f20a7f.tar.bz2
plus-b863927543393468a7153775c18ef04a59f20a7f.tar.xz
plus-b863927543393468a7153775c18ef04a59f20a7f.zip
allow auto close npc dialog if it almost closed and press moving keys.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index eada32f45..52c348a7e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -65,6 +65,7 @@
#include "gui/windows/killstats.h"
#include "gui/windows/minimap.h"
#include "gui/windows/ministatuswindow.h"
+#include "gui/windows/npcdialog.h"
#include "gui/windows/okdialog.h"
#include "gui/windows/outfitwindow.h"
#include "gui/windows/setup.h"
@@ -803,10 +804,16 @@ void Game::handleMove()
return;
// Moving player around
- if (player_node->isAlive() && !PlayerInfo::isTalking()
- && chatWindow && !chatWindow->isInputFocused()
- && !InventoryWindow::isAnyInputFocused() && !quitDialog)
+ if (player_node->isAlive()
+ && chatWindow
+ && !chatWindow->isInputFocused()
+ && !InventoryWindow::isAnyInputFocused()
+ && !quitDialog)
{
+ NpcDialog *const dialog = NpcDialog::getActive();
+ if (dialog)
+ return;
+
// Ignore input if either "ignore" key is pressed
// Stops the character moving about if the user's window manager
// uses "ignore+arrow key" to switch virtual desktops.