From d9fe9f23bfef1371949409016139ece0851808bc Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 6 Dec 2008 17:48:03 -0700 Subject: Prevent the player from continuing to walk after opening a NPC dialog. This used to be caused by right clicking on an NPC, then clicking on it and telling the sprite to move at the same time. Signed-off-by: Ira Rice --- src/net/npchandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 65259959..4f3c4354 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -24,6 +24,7 @@ #include "protocol.h" #include "../beingmanager.h" +#include "../localplayer.h" #include "../npc.h" #include "../gui/npc_text.h" @@ -53,6 +54,7 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_CHOICE: msg->readInt16(); // length id = msg->readInt32(); + player_node->setAction(LocalPlayer::STAND); current_npc = dynamic_cast(beingManager->findBeing(id)); npcListDialog->parseItems(msg->readString(msg->getLength() - 8)); npcListDialog->setVisible(true); @@ -61,6 +63,7 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_MESSAGE: msg->readInt16(); // length id = msg->readInt32(); + player_node->setAction(LocalPlayer::STAND); current_npc = dynamic_cast(beingManager->findBeing(id)); npcTextDialog->addText(msg->readString(msg->getLength() - 8)); npcListDialog->setVisible(false); -- cgit v1.2.3-70-g09d2