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

fix(pawn): Fixes issue with setting player type to hmd, it was never actually set.

parent 0f95bcd7
No related branches found
No related tags found
2 merge requests!120UE5.4-2024.1,!113Pull dev/5.4 changes into dev/5.5
Pipeline #525691 failed
This commit is part of merge request !113. Comments created here will be created in the context of that merge request.
...@@ -122,14 +122,18 @@ void ARWTHVRPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponen ...@@ -122,14 +122,18 @@ void ARWTHVRPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponen
if (ARWTHVRPlayerState* State = GetPlayerState<ARWTHVRPlayerState>()) if (ARWTHVRPlayerState* State = GetPlayerState<ARWTHVRPlayerState>())
{ {
// Might not be properly synced yet? // Might not be properly synced yet?
const EPlayerType Type = State->GetPlayerType(); EPlayerType Type = State->GetPlayerType();
// Don't do anything with the type if it's been set to clustertype or anything. // Don't do anything with the type if it's been set to clustertype or anything.
// This is already being done when connecting to the server. // This is already being done when connecting to the server.
const bool bClusterType = Type == EPlayerType::nDisplayPrimary || Type == EPlayerType::nDisplaySecondary; const bool bClusterType = Type == EPlayerType::nDisplayPrimary || Type == EPlayerType::nDisplaySecondary;
if (!bClusterType && URWTHVRUtilities::IsHeadMountedMode()) if (!bClusterType)
{ {
if (URWTHVRUtilities::IsHeadMountedMode())
Type = EPlayerType::HMD;
UE_LOGFMT(Toolkit, Display, "Pawn: Requesting Player Type {T}...", StaticCast<int8>(Type));
// Could be too early to call this RPC... // Could be too early to call this RPC...
State->RequestSetPlayerType(Type); State->RequestSetPlayerType(Type);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment