Bugfix Dialogue Voice Overs for More Text Edge Cases
This commit is contained in:
parent
dae45d306d
commit
4142af94bd
@ -96,8 +96,11 @@ void UAC_PlayerDialogueInterpreter::NextDialogue()
|
||||
CurrentTextNode = Cast<UDialogueTextNode>(CurrentTextNode->ChildrenNodes[0]);
|
||||
CurrentCharacterSpeaking = *GetCharacterSpeakingFromEnum(CurrentTextNode->DialogueCharacterSpeaking);
|
||||
OnNextDialogue.Broadcast(CurrentTextNode);
|
||||
CurrentVoiceOverAudioComponent = UGameplayStatics::SpawnSound2D(
|
||||
GetWorld(), CurrentTextNode->DialogueVoiceOver, 1.f, 1.f, 0.f, nullptr, false, false);
|
||||
if (IsValid(CurrentTextNode->DialogueVoiceOver))
|
||||
{
|
||||
CurrentVoiceOverAudioComponent = UGameplayStatics::SpawnSound2D(
|
||||
GetWorld(), CurrentTextNode->DialogueVoiceOver, 1.f, 1.f, 0.f, nullptr, false, false);
|
||||
}
|
||||
CurrentChoiceNode = nullptr;
|
||||
CurrentAddItemNode = nullptr;
|
||||
}
|
||||
@ -129,6 +132,11 @@ void UAC_PlayerDialogueInterpreter::NextDialogue()
|
||||
CurrentTextNode = Cast<UDialogueTextNode>(CurrentAddItemNode->ChildrenNodes[0]);
|
||||
CurrentCharacterSpeaking = *GetCharacterSpeakingFromEnum(CurrentTextNode->DialogueCharacterSpeaking);
|
||||
OnNextDialogue.Broadcast(CurrentTextNode);
|
||||
if (IsValid(CurrentTextNode->DialogueVoiceOver))
|
||||
{
|
||||
CurrentVoiceOverAudioComponent = UGameplayStatics::SpawnSound2D(
|
||||
GetWorld(), CurrentTextNode->DialogueVoiceOver, 1.f, 1.f, 0.f, nullptr, false, false);
|
||||
}
|
||||
CurrentChoiceNode = nullptr;
|
||||
CurrentAddItemNode = nullptr;
|
||||
}
|
||||
@ -158,6 +166,11 @@ void UAC_PlayerDialogueInterpreter::MakeChoiceDialogue(const int Choice)
|
||||
CurrentTextNode = Cast<UDialogueTextNode>(CurrentChoiceNode->ChildrenNodes[Choice]);
|
||||
CurrentCharacterSpeaking = *GetCharacterSpeakingFromEnum(CurrentTextNode->DialogueCharacterSpeaking);
|
||||
OnNextDialogue.Broadcast(CurrentTextNode);
|
||||
if (IsValid(CurrentTextNode->DialogueVoiceOver))
|
||||
{
|
||||
CurrentVoiceOverAudioComponent = UGameplayStatics::SpawnSound2D(
|
||||
GetWorld(), CurrentTextNode->DialogueVoiceOver, 1.f, 1.f, 0.f, nullptr, false, false);
|
||||
}
|
||||
CurrentChoiceNode = nullptr;
|
||||
}
|
||||
else if (Cast<UDialogueAddItemNode>(CurrentChoiceNode->ChildrenNodes[Choice]))
|
||||
|
Loading…
Reference in New Issue
Block a user