mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- fixed: Strife dialogues could crash on invalid links.
This commit is contained in:
parent
beb7a8e4a2
commit
400038643c
1 changed files with 3 additions and 2 deletions
|
@ -1347,9 +1347,10 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
||||||
int rootnode = npc->ConversationRoot;
|
int rootnode = npc->ConversationRoot;
|
||||||
if (reply->NextNode < 0)
|
if (reply->NextNode < 0)
|
||||||
{
|
{
|
||||||
npc->Conversation = StrifeDialogues[rootnode - reply->NextNode - 1];
|
unsigned next = (unsigned)(rootnode - reply->NextNode - 1);
|
||||||
if (gameaction != ga_slideshow)
|
if (gameaction != ga_slideshow && next < StrifeDialogues.Size())
|
||||||
{
|
{
|
||||||
|
npc->Conversation = StrifeDialogues[next];
|
||||||
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
|
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue