See title. I recently just added this line and crashed. Thought I missed something (I was working from the challenge slide at the time) and went on with the video… my code matches Ben’s.
Here is my code:
Source
void ATankPlayerController::ProcessPossessedTankDeath()
{
UE_LOG(LogTemp, Warning, TEXT(“Player tank died :(”));
if (!GetPawn()) { return; }
StartSpectatingOnly();
}
Header
UFUNCTION()
void ProcessPossessedTankDeath();
Repo is here.