From d217397a809a97e62050092a8a3cf2787f4c12e7 Mon Sep 17 00:00:00 2001 From: "adnan.mujkic" Date: Thu, 17 Sep 2026 23:30:02 +0200 Subject: [PATCH] Remove flying context --- Content/Input/IMC_FlyingContext.uasset | 3 --- .../Blueprints/MainPlayerController.uasset | 4 ++-- .../ProjectEleri/Private/EleriPlayerController.cpp | 14 -------------- Source/ProjectEleri/Public/EleriPlayerController.h | 2 -- 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 Content/Input/IMC_FlyingContext.uasset diff --git a/Content/Input/IMC_FlyingContext.uasset b/Content/Input/IMC_FlyingContext.uasset deleted file mode 100644 index 5ef8282f..00000000 --- a/Content/Input/IMC_FlyingContext.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9250ded742ded0fe878e5264ec191ab50de6329dff7170999a719bab4144f3bf -size 7854 diff --git a/Content/ThirdPersonBP/Blueprints/MainPlayerController.uasset b/Content/ThirdPersonBP/Blueprints/MainPlayerController.uasset index 7ed5f101..79e3cd40 100644 --- a/Content/ThirdPersonBP/Blueprints/MainPlayerController.uasset +++ b/Content/ThirdPersonBP/Blueprints/MainPlayerController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4724be011ecf01af59f7e553c1e357971982171cd9e51aea8e51fada2d5ccafc -size 74975 +oid sha256:108d99194a4f95318ab0e5584528da8619c9fec779abd8948c0db1ee844dc50d +size 74780 diff --git a/Source/ProjectEleri/Private/EleriPlayerController.cpp b/Source/ProjectEleri/Private/EleriPlayerController.cpp index 63b87a8c..55ee196f 100644 --- a/Source/ProjectEleri/Private/EleriPlayerController.cpp +++ b/Source/ProjectEleri/Private/EleriPlayerController.cpp @@ -536,20 +536,6 @@ void AEleriPlayerController::OnStartFlyingAction(const FInputActionValue &Value) MovementComponent->SetMovementMode(EMovementMode::MOVE_Walking); } - if (UEnhancedInputLocalPlayerSubsystem *Subsystem = ULocalPlayer::GetSubsystem(GetLocalPlayer())) - { - // PawnClientRestart can run more than once in an Actor's lifetime, so start by clearing out any leftover mappings. - if (bFlying) - { - Subsystem->RemoveMappingContext(MovementContext); - Subsystem->AddMappingContext(FlyingContext, 1); - } - else - { - Subsystem->RemoveMappingContext(FlyingContext); - Subsystem->AddMappingContext(MovementContext, 1); - } - } if (PlayerCharacter) { PlayerCharacter->ToggleBroomActor(bFlying); diff --git a/Source/ProjectEleri/Public/EleriPlayerController.h b/Source/ProjectEleri/Public/EleriPlayerController.h index 68b9ec32..94d54247 100644 --- a/Source/ProjectEleri/Public/EleriPlayerController.h +++ b/Source/ProjectEleri/Public/EleriPlayerController.h @@ -184,8 +184,6 @@ public: UPROPERTY(EditDefaultsOnly, Category = "Locomotion Input") UInputAction* StartFlyingAction; - UPROPERTY(EditDefaultsOnly, Category = "Locomotion Input") - UInputMappingContext* FlyingContext; UPROPERTY(EditDefaultsOnly, Category = "UI Input") UInputMappingContext* UiContext;