summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 0748d65b..164eab55 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -124,11 +124,11 @@ const int MAX_TIME = 10000;
class WeightNoticeListener : public gcn::ActionListener
{
-public:
- void action(const std::string &eventId)
- {
- weightNotice = NULL;
- }
+ public:
+ void action(const std::string &eventId)
+ {
+ weightNotice = NULL;
+ }
} weightNoticeListener;
@@ -509,7 +509,10 @@ void do_input()
// Input chat window
case SDLK_RETURN:
- if (chatWindow->isFocused()) {
+ if (chatWindow->isFocused() ||
+ deathNotice != NULL ||
+ weightNotice != NULL)
+ {
break;
}
@@ -518,15 +521,6 @@ void do_input()
{
state = EXIT;
}
- // Accept the Death Notice...
- else if (deathNotice)
- {
- deathNotice->action("ok");
- }
- else if (weightNotice)
- {
- weightNotice->action("ok");
- }
// Close the Browser if opened
else if (helpWindow->isVisible())
{
@@ -1583,7 +1577,6 @@ void do_parse()
deathNotice = new OkDialog("Message",
"You're now dead, press ok to restart",
&deathNoticeListener);
- deathNotice->releaseModalFocus();
player_node->action = Being::DEAD;
}
}