mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Merge pull request #493 from alexey-lysiuk/dialog_fixes
Fixes for Strife dialog
This commit is contained in:
commit
65662a9cfa
1 changed files with 16 additions and 8 deletions
|
@ -1345,22 +1345,30 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
||||||
if (reply->NextNode != 0)
|
if (reply->NextNode != 0)
|
||||||
{
|
{
|
||||||
int rootnode = npc->ConversationRoot;
|
int rootnode = npc->ConversationRoot;
|
||||||
unsigned next = (unsigned)(rootnode + (reply->NextNode < 0 ? -1 : 1) * reply->NextNode - 1);
|
const bool isNegative = reply->NextNode < 0;
|
||||||
|
const unsigned next = (unsigned)(rootnode + (isNegative ? -1 : 1) * reply->NextNode - 1);
|
||||||
|
|
||||||
if (next < StrifeDialogues.Size())
|
if (next < StrifeDialogues.Size())
|
||||||
{
|
{
|
||||||
npc->Conversation = StrifeDialogues[next];
|
npc->Conversation = StrifeDialogues[next];
|
||||||
|
|
||||||
if (gameaction != ga_slideshow)
|
if (isNegative)
|
||||||
{
|
{
|
||||||
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
|
if (gameaction != ga_slideshow)
|
||||||
return;
|
{
|
||||||
}
|
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
|
||||||
else
|
return;
|
||||||
{
|
}
|
||||||
S_StopSound (npc, CHAN_VOICE);
|
else
|
||||||
|
{
|
||||||
|
S_StopSound (npc, CHAN_VOICE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Printf ("Next node %u is invalid, no such dialog page\n", next);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->angle = player->ConversationNPCAngle;
|
npc->angle = player->ConversationNPCAngle;
|
||||||
|
|
Loading…
Reference in a new issue