Skip to content
Snippets Groups Projects
Commit 95f0b84c authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Merge remote-tracking branch 'remotes/origin/dev/5.3' into dev/5.4

# Conflicts:
#	Content/Examples/ContentExamples/ToolkitExamples.umap
parents 470a1f35 eacc6d98
Branches
Tags
No related merge requests found
Showing
with 11 additions and 19 deletions
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
......@@ -97,7 +97,8 @@ void UIntenSelectable::InitDefaultBehaviourReferences()
{
// Scoring
for (TSet<UActorComponent*> AllComponents = GetOwner()->GetComponents(); UActorComponent * c : AllComponents)
TSet<UActorComponent*> AllComponents = GetOwner()->GetComponents();
for (UActorComponent * c : AllComponents)
{
if (UIntenSelectableScoring* TryToGetScoring = Cast<UIntenSelectableScoring>(c))
{
......
......@@ -85,31 +85,21 @@ void UIntenSelectComponent::BeginPlay()
void UIntenSelectComponent::InitInputBindings()
{
const APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
UEnhancedInputLocalPlayerSubsystem* Subsystem =
ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PC->GetLocalPlayer());
UInputComponent* PlayerInputComponent = PC->InputComponent;
UEnhancedInputComponent* PEI = Cast<UEnhancedInputComponent>(PlayerInputComponent);
const APawn* Pawn = Cast<APawn>(GetOwner());
if (!Pawn)
return;
UEnhancedInputComponent* EI = Cast<UEnhancedInputComponent>(Pawn->InputComponent);
if (!PEI)
if (!EI)
{
const FString Message = "Could not get PlayerInputComponent for IntenSelect Input Assignment!";
#if WITH_EDITOR
const FText Title = FText::FromString(FString("ERROR"));
FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title);
#endif
UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
UKismetSystemLibrary::QuitGame(this, nullptr, EQuitPreference::Quit, false);
return;
}
// Bind the actions
PEI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
PEI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
EI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
EI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
}
void UIntenSelectComponent::InitSplineComponent()
......
......@@ -80,7 +80,8 @@ void ARWTHVRPawn::NotifyControllerChanged()
Super::NotifyControllerChanged();
UE_LOG(Toolkit, Display, TEXT("ARWTHVRPawn: Player Controller has changed, trying to change DCRA attachment if possible..."));
UE_LOG(Toolkit, Display,
TEXT("ARWTHVRPawn: Player Controller has changed, trying to change DCRA attachment if possible..."));
// Only do this for all local controlled pawns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment