summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-10-28 21:54:30 +0000
committerDennis Friis <peavey@placid.dk>2008-10-28 21:54:30 +0000
commitd947a9ea994fa7bf4899b2460b1904557dfbc796 (patch)
tree0e409aae2960c5466b68abf378c50cc9948ab143
parentf924885ea0db5842b080610ec63e61a4bcc2a30c (diff)
downloadmana-d947a9ea994fa7bf4899b2460b1904557dfbc796.tar.gz
mana-d947a9ea994fa7bf4899b2460b1904557dfbc796.tar.bz2
mana-d947a9ea994fa7bf4899b2460b1904557dfbc796.tar.xz
mana-d947a9ea994fa7bf4899b2460b1904557dfbc796.zip
Handle NPC script close. Fixes client input freeze on no-dialog NPCs.
-rw-r--r--ChangeLog5
-rw-r--r--src/net/npchandler.cpp10
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 33a9fa50..380c4382 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-28 Dennis Friis <peavey@placid.dk>
+
+ * src/net/npchandler.cpp: Handle NPC script close. Fixes client input
+ freeze on no-dialog NPCs.
+
2008-10-28 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/game.cpp: Fixed trade window being visible on client startup
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index da21b2a5..d41aaaad 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -70,9 +70,15 @@ void NPCHandler::handleMessage(MessageIn *msg)
npcTextDialog->setVisible(true);
break;
- case SMSG_NPC_NEXT:
case SMSG_NPC_CLOSE:
- // Next/Close button in NPC dialog, currently unused
+ id = msg->readInt32();
+ dynamic_cast<NPC*>(beingManager->findBeing(id));
+ if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id)))
+ current_npc = NULL;
+ break;
+
+ case SMSG_NPC_NEXT:
+ // Next button in NPC dialog, currently unused
break;
}
}