Remove unnecessary testing

This commit is contained in:
Louis Hobbs 2023-06-28 23:14:41 +01:00
parent bff484f139
commit 596bae1855
1 changed files with 2 additions and 10 deletions

View File

@ -243,15 +243,7 @@ void APlayerCharacter::CalculateHits(TArray<FHitResult>* hits)
FVector TraceStart;
FRotator PlayerRot;
APlayerController* Con;
Con = GetController<APlayerController>();
if (!Con)
{
return;
}
Con->GetPlayerViewPoint(TraceStart, PlayerRot);
GetController<APlayerController>()->GetPlayerViewPoint(TraceStart, PlayerRot);
TraceStart = GetRootComponent()->GetComponentLocation();
FVector AimDir = PlayerRot.Vector();
TraceStart = TraceStart + AimDir * ((GetInstigator()->GetActorLocation() - TraceStart) | AimDir);