minor player controller fixes
This commit is contained in:
@@ -98,7 +98,7 @@ float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
|
|||||||
{
|
{
|
||||||
if (IsValid(Actor))
|
if (IsValid(Actor))
|
||||||
{
|
{
|
||||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)};
|
||||||
if (IsValid(TouchComponent))
|
if (IsValid(TouchComponent))
|
||||||
{
|
{
|
||||||
return TouchComponent->GetForceFeedbackLevel();
|
return TouchComponent->GetForceFeedbackLevel();
|
||||||
@@ -142,7 +142,7 @@ void ASGPlayerController::BeginPlay()
|
|||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
ASGPawn* SGPawn = Cast<ASGPawn>(GetPawn());
|
ASGPawn* SGPawn{Cast<ASGPawn>(GetPawn())};
|
||||||
if (!ensureAlwaysMsgf(IsValid(SGPawn), TEXT("%s"), TEXT("ERROR: invalid SenseGlove pawn!")))
|
if (!ensureAlwaysMsgf(IsValid(SGPawn), TEXT("%s"), TEXT("ERROR: invalid SenseGlove pawn!")))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -233,7 +233,7 @@ USGCustomWaveform* ASGPlayerController::FImpl::GetCustomWaveform(const AActor* A
|
|||||||
|
|
||||||
if (IsValid(Actor))
|
if (IsValid(Actor))
|
||||||
{
|
{
|
||||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)};
|
||||||
if (IsValid(TouchComponent))
|
if (IsValid(TouchComponent))
|
||||||
{
|
{
|
||||||
Amplitude = TouchComponent->GetVibrotactileAmplitude();
|
Amplitude = TouchComponent->GetVibrotactileAmplitude();
|
||||||
@@ -257,7 +257,7 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove* Glove = TouchState.Hand->GetConnectedGlove();
|
USGHapticGlove* Glove{TouchState.Hand->GetConnectedGlove()};
|
||||||
if (!IsValid(Glove))
|
if (!IsValid(Glove))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user