diff options
author | Ira Rice <irarice@gmail.com> | 2008-12-06 17:48:03 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-12-06 17:48:03 -0700 |
commit | d9fe9f23bfef1371949409016139ece0851808bc (patch) | |
tree | fe94d92eb7e513bbffcb54950c2c2f5768595b48 | |
parent | 64fe627d25841d047c1c7da16a0740ab537973cb (diff) | |
download | Mana-d9fe9f23bfef1371949409016139ece0851808bc.tar.gz Mana-d9fe9f23bfef1371949409016139ece0851808bc.tar.bz2 Mana-d9fe9f23bfef1371949409016139ece0851808bc.tar.xz Mana-d9fe9f23bfef1371949409016139ece0851808bc.zip |
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 <irarice@gmail.com>
-rw-r--r-- | src/net/npchandler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<NPC*>(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<NPC*>(beingManager->findBeing(id)); npcTextDialog->addText(msg->readString(msg->getLength() - 8)); npcListDialog->setVisible(false); |