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();
|
||||
|
||||
//Character & Camera refs
|
||||
TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||
MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
||||
if (TempCharacterRef != nullptr) TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||
if (MainCamera != nullptr) MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
||||
//Item refs
|
||||
|
||||
TargetHealingLocation = HealingItem->GetActorLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user