From 15ee7fac6a40768b635c694ffeb12d3cde87fbe4 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Mon, 9 Feb 2026 16:40:03 +0100 Subject: [PATCH] minor player controller fixes --- .../SenseGlove/GameFramework/SGPlayerController.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp index 3b5205e0..788439e1 100644 --- a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp @@ -98,7 +98,7 @@ float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor) { if (IsValid(Actor)) { - const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor); + const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)}; if (IsValid(TouchComponent)) { return TouchComponent->GetForceFeedbackLevel(); @@ -142,7 +142,7 @@ void ASGPlayerController::BeginPlay() { Super::BeginPlay(); - ASGPawn* SGPawn = Cast(GetPawn()); + ASGPawn* SGPawn{Cast(GetPawn())}; if (!ensureAlwaysMsgf(IsValid(SGPawn), TEXT("%s"), TEXT("ERROR: invalid SenseGlove pawn!"))) { return; @@ -233,7 +233,7 @@ USGCustomWaveform* ASGPlayerController::FImpl::GetCustomWaveform(const AActor* A if (IsValid(Actor)) { - const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor); + const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)}; if (IsValid(TouchComponent)) { Amplitude = TouchComponent->GetVibrotactileAmplitude(); @@ -257,7 +257,7 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc return; } - USGHapticGlove* Glove = TouchState.Hand->GetConnectedGlove(); + USGHapticGlove* Glove{TouchState.Hand->GetConnectedGlove()}; if (!IsValid(Glove)) { return;