Update Final Checkpoint to Return to Main Menu on Competition
This commit is contained in:
parent
1babde28e4
commit
5332a00a4e
@ -14,6 +14,12 @@ void AFinalCheckpoint::CompleteBounty()
|
|||||||
GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave++;
|
GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave++;
|
||||||
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
|
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
|
||||||
|
|
||||||
|
if (UGameplayStatics::GetCurrentLevelName(GetWorld()) == "Apartment_hit")
|
||||||
|
{
|
||||||
|
UGameplayStatics::OpenLevel(GetWorld(), "MainMenuLevel");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
FName OpnWrldLvlName = FName(Cast<ABountyHunterCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GetOpenWorldLevelName());
|
FName OpnWrldLvlName = FName(Cast<ABountyHunterCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GetOpenWorldLevelName());
|
||||||
UGameplayStatics::OpenLevel(GetWorld(), OpnWrldLvlName);
|
UGameplayStatics::OpenLevel(GetWorld(), OpnWrldLvlName);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user