From e523e12d915f4563aede00a533cb516baf106e86 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 Jan 2011 18:06:25 +0000 Subject: [PATCH] - fixed: Not all exit conditions in dialogues unset the MF5_INCONVERSATION flag. SVN r3125 (trunk) --- src/p_conversation.cpp | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 39da6b65a..5b023c28a 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -124,7 +124,6 @@ static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeaker static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses); static bool DrawConversationMenu (); static void PickConversationReply (int replyindex); -static void CleanupConversationMenu (); static void TerminalResponse (const char *str); static FStrifeDialogueNode *PrevNode; @@ -845,6 +844,7 @@ public: } else if (mkey == MKEY_Back) { + Net_WriteByte (DEM_CONVNULL); Close(); return true; } @@ -1225,13 +1225,15 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply node = StrifeDialogues[nodenum]; for (i = 0, reply = node->Children; reply != NULL && i != replynum; ++i, reply = reply->Next) { } + npc = player->ConversationNPC; if (reply == NULL) { + // The default reply was selected + npc->angle = player->ConversationNPCAngle; + npc->flags5 &= ~MF5_INCONVERSATION; return; } - npc = player->ConversationNPC; - // Check if you have the requisite items for this choice for (i = 0; i < (int)reply->ItemCheck.Size(); ++i) { @@ -1384,32 +1386,6 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply } } -//============================================================================ -// -// CleanupConversationMenu -// -// Release the resources used to create the most recent conversation menu. -// -//============================================================================ - -void CleanupConversationMenu () -{ -} - -//============================================================================ -// -// ConversationMenuEscaped -// -// Called when the user presses escape to leave the conversation menu. -// -//============================================================================ - -void ConversationMenuEscaped () -{ - CleanupConversationMenu (); - Net_WriteByte (DEM_CONVNULL); -} - //============================================================================ // // P_ConversationCommand