From 783e13075c9f1a88e81630cab8ebb464d4fe1716 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 00:55:55 +0000 Subject: [PATCH] Updated TempCharacter Made the linetrace boolean a global in the headerfile for potential future enemy detection --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 +- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 5f69731..eae1761 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -74,7 +74,7 @@ void ATempCharacter::LineTraceLogic() TraceParams.AddIgnoredActor(this); - bool bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); + bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); if (bHit) { if(OutHit.GetActor() == nullptr) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index ae540de..4147e2b 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -47,6 +47,9 @@ public: UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold") int GoldBalance; + UPROPERTY(VisibleDefaultsOnly, Category = "LineTrace") + bool bHit; + //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class