Bugfix Able to Open Dialogue in Merchant

This commit is contained in:
Philip W 2023-05-21 21:30:27 +01:00
parent 276a0c5ff4
commit 81a306f7b0

View File

@ -4,6 +4,7 @@
#include "InteractNPC.h"
#include "DialogueNPC.h"
#include "Camera/CameraComponent.h"
#include "the_twilight_abyss/PlayerTemp/TempCharacter.h"
// Sets default values for this component's properties
@ -47,6 +48,7 @@ void UInteractNPC::Interact()
if (HitResult.GetActor()->Tags.Contains("NPC"))
{
//DrawDebugLine(GetWorld(), Start, End, FColor::Green, false, 5.0f, 0, 10.0f);
if (Cast<ATempCharacter>(GetOwner())->bShopKeeperText) return;
UDialogueNPC* DialogueNPC = HitResult.GetActor()->FindComponentByClass<UDialogueNPC>();
if (DialogueNPC->bIsInDialogue)
{