Skip to content

Commit

Permalink
Merge pull request #477 from alexey-lysiuk/fix_strife_dialog
Browse files Browse the repository at this point in the history
Fixed stuck Strife dialogs
  • Loading branch information
coelckers committed Jan 15, 2016
2 parents 5872a60 + a8e5b90 commit 91d56aa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/p_conversation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,12 +1345,14 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
if (reply->NextNode != 0)
{
int rootnode = npc->ConversationRoot;
if (reply->NextNode < 0)
unsigned next = (unsigned)(rootnode + (reply->NextNode < 0 ? -1 : 1) * reply->NextNode - 1);

if (next < StrifeDialogues.Size())
{
unsigned next = (unsigned)(rootnode - reply->NextNode - 1);
if (gameaction != ga_slideshow && next < StrifeDialogues.Size())
npc->Conversation = StrifeDialogues[next];

if (gameaction != ga_slideshow)
{
npc->Conversation = StrifeDialogues[next];
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
return;
}
Expand All @@ -1359,10 +1361,6 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
S_StopSound (npc, CHAN_VOICE);
}
}
else
{
npc->Conversation = StrifeDialogues[rootnode + reply->NextNode - 1];
}
}

npc->angle = player->ConversationNPCAngle;
Expand Down

0 comments on commit 91d56aa

Please sign in to comment.