Make orbs that you can pick up while flying, tweak GL settings, fix bug where game would not toggle main ui on start

This commit is contained in:
2026-10-18 21:30:36 +02:00
parent 3669080a6b
commit 014b7a56fc
335 changed files with 636 additions and 456 deletions

View File

@@ -17,9 +17,7 @@ void UEleriAudioSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);
#if WITH_EDITOR
#elif
#if !WITH_EDITOR
// The rotation starts on its own, so that a level does not have to remember to ask for music. Safe
// here because a game instance is handed the world it will run in before its subsystems are
// initialised, so GetWorld() already answers with the world the music is going to live in.

View File

@@ -0,0 +1,37 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "EleriMovementComponent.h"
#include "Components/StatForgeComponent.h"
#include "Data/StatDefinitions.h"
#include "Helpers/StatForgeFunctionLibrary.h"
#include "System/EleriGameplayTags.h"
#include "System/MainBlueprintFunctionLibrary.h"
float UEleriMovementComponent::GetMaxSpeed() const
{
if (StatForgeComponent->GetGameplayTags().HasTagExact(CharacterState::MovementDisabled))
{
return 0.f;
}
const float BaseSpeed = Super::GetMaxSpeed();
if (StatForgeComponent)
{
const float Multi = StatForgeComponent->GetStatValue(FStat::MovementSpeedMultiplier);
return BaseSpeed * Multi;
}
return BaseSpeed;
}
void UEleriMovementComponent::BeginPlay()
{
Super::BeginPlay();
StatForgeComponent = UMainBlueprintFunctionLibrary::GetStatForgeComponentFromActor(GetOwner());
}

View File

@@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "EleriMovementComponent.generated.h"
class UStatForgeComponent;
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class PROJECTELERI_API UEleriMovementComponent : public UCharacterMovementComponent
{
GENERATED_BODY()
virtual float GetMaxSpeed() const override;
virtual void BeginPlay() override;
protected:
UPROPERTY()
UStatForgeComponent* StatForgeComponent = nullptr;
};

View File

@@ -60,6 +60,11 @@ void AEleriPlayerController::BeginPlay()
SelectionManagerInventorySlots = NewObject<USelectionManager>();
ToggleMovement(true);
GetWorld()->GetTimerManager().SetTimerForNextTick(FTimerDelegate::CreateWeakLambda(this, [this]()
{
MainGameUI->ToggleGameMenu(true);
}));
}
void AEleriPlayerController::EndPlay(const EEndPlayReason::Type EndPlayReason)
@@ -383,13 +388,11 @@ void AEleriPlayerController::OnMove(const FInputActionValue &Value)
return;
}
const float AppliedMovementVelocity = UStatForgeFunctionLibrary::GetStatValue(FStat::MovementSpeedMultiplier, PlayerCharacter);
const FVector ForwardVec = PlayerCharacter->GetPlayerCamera()->GetForwardVector();
const FVector RightVec = PlayerCharacter->GetPlayerCamera()->GetRightVector();
PlayerCharacter->AddMovementInput(ForwardVec, MovementDirection.Y * AppliedMovementVelocity);
PlayerCharacter->AddMovementInput(RightVec, MovementDirection.X * AppliedMovementVelocity);
PlayerCharacter->AddMovementInput(ForwardVec, MovementDirection.Y);
PlayerCharacter->AddMovementInput(RightVec, MovementDirection.X);
}
}
@@ -540,8 +543,7 @@ void AEleriPlayerController::OnStartFlyingAction(const FInputActionValue &Value)
{
MovementComponent->Velocity = FVector::ZeroVector;
MovementComponent->SetMovementMode(EMovementMode::MOVE_Flying);
} }),
0.25f, false);
} }),0.25f, false);
}
else
{