Quality of Life Changes

This commit is contained in:
Rafal Swierczek 2024-02-28 07:17:52 +00:00
parent d8a04aec38
commit 8d5e02916f
15 changed files with 37 additions and 21 deletions

BIN
EndlessVendetta/Content/FirstPerson/BP_InvisibleWall.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -122,6 +122,8 @@ void ABountyHunterCharacter::BeginPlay()
SpawnMainBounty(GI);
if (UGameplayStatics::GetCurrentLevelName(GetWorld()) == OpenWorldLevelName)
{
InOpenWorld = true;
SpawnBikeUI();
SpawnSideBounties(GI);
FTransform SpawnTransfrom = GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave;
SetActorTransform(SpawnTransfrom);

View File

@ -92,7 +92,9 @@ protected:
// Called When Actor destroyed or Removed from Level
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
UFUNCTION(BlueprintImplementableEvent)
void SpawnBikeUI();
public:
// Used by Final Checkpoint to always load the Level set as the Open Level in here
FString GetOpenWorldLevelName()

View File

@ -745,7 +745,7 @@ void AEndlessVendettaCharacter::UpdateInventorySize(int Cols, int Rows)
void AEndlessVendettaCharacter::HoldInteract()
{
if (InPauseMenu) return;
if (InPauseMenu || !InOpenWorld) return;
if (PlayerOnShip)
{
ExitShip(GetActorTransform());

View File

@ -32,6 +32,8 @@ protected:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Mesh)
USkeletalMeshComponent* Mesh1P;
bool InOpenWorld = false;
private:
/** First person camera */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))

View File

@ -37,10 +37,12 @@ void AGadgetTutorialStation::Interact()
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
PickGadgetWidget = CreateWidget<UUserWidget>(GetWorld(), PickGadgetWidgetClass);
PickGadgetWidget->AddToViewport(3);
DisableInput(PlayerController);
PlayerController->SetInputMode(InputMode);
PlayerController->bShowMouseCursor = true;
PlayerController->bEnableClickEvents = true;
PlayerController->bEnableMouseOverEvents = true;
EnableInput(PlayerController);
// Set up gadget menu's behaviours
GadgetMenu = Cast<UGadgetMenu>(PickGadgetWidget);
@ -94,9 +96,14 @@ void AGadgetTutorialStation::SelectGadget()
FActorSpawnParameters SpawnParams;
SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
TSubclassOf<ABaseGadgetTutorial> GadgetTutorialToSpawnInClass = GadgetsArray[GadgetIndex]->GetDefaultObject<AGadgetBase>()->GadgetTutorialClass;
if (!IsValid(GadgetTutorialToSpawnInClass)) return;
if (!IsValid(GadgetTutorialToSpawnInClass))
{
CloseWidget();
return;
}
AActor* GadgetTutorialActor = GetWorld()->SpawnActor<AActor>(GadgetTutorialToSpawnInClass, GadgetTutorialSpawnTransform.GetLocation(), GadgetTutorialSpawnTransform.GetRotation().Rotator(), SpawnParams);
CurrentGadgetTutorial = Cast<ABaseGadgetTutorial>(GadgetTutorialActor);
CloseWidget();
}
void AGadgetTutorialStation::CloseWidget()