Temporarily move level reloading on death from Destroyed to OnDeath

This commit is contained in:
baz 2023-12-13 21:44:42 +00:00
parent 98e49a913d
commit ee42aabc2a
1 changed files with 5 additions and 4 deletions

View File

@ -99,10 +99,6 @@ void APlayerCharacter::BeginPlay()
void APlayerCharacter::Destroyed()
{
FString map = GetWorld()->GetMapName();
map.RemoveFromStart("UEDPIE_0_"); // We have to remove this for reason, I don't fully understand at the moment
UGameplayStatics::OpenLevel(this, FName(map), false);
Super::Destroyed();
}
@ -445,6 +441,11 @@ void APlayerCharacter::OnDeath()
IsFiring = false;
ClearAllTimers();
// TODO: Move this out into it's own method.
FString map = GetWorld()->GetMapName();
map.RemoveFromStart("UEDPIE_0_"); // We have to remove this for reason, I don't fully understand at the moment
UGameplayStatics::OpenLevel(this, FName(map), false);
}
void APlayerCharacter::SetMovementSpeed()