minor player controller fixes
This commit is contained in:
@@ -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<ASGPawn>(GetPawn());
|
||||
ASGPawn* SGPawn{Cast<ASGPawn>(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;
|
||||
|
||||
Reference in New Issue
Block a user