Updated Interaction.cpp to fix certain crashes
This commit is contained in:
parent
dd1ab03357
commit
38caa46e58
@ -25,8 +25,8 @@ void AInteraction::BeginPlay()
|
|||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
//Character & Camera refs
|
//Character & Camera refs
|
||||||
TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
if (TempCharacterRef != nullptr) TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||||
MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
if (MainCamera != nullptr) MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
||||||
//Item refs
|
//Item refs
|
||||||
|
|
||||||
TargetHealingLocation = HealingItem->GetActorLocation();
|
TargetHealingLocation = HealingItem->GetActorLocation();
|
||||||
|
Loading…
Reference in New Issue
Block a user