From 8bb2a43d8bd93060688f93e3a02319c9c2a800d2 Mon Sep 17 00:00:00 2001
From: David Gilbert <gilbert@vr.rwth-aachen.de>
Date: Wed, 15 Nov 2023 16:29:59 +0100
Subject: [PATCH] fix(cave): Fixes an issues with DCRA attachment to pawn, a
 bracket was at the wrong place.

---
 Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp b/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
index 28309ec3..786ffc35 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
@@ -64,8 +64,8 @@ void AVirtualRealityPawn::NotifyControllerChanged()
 	if (IsLocallyControlled())
 	{
 		// Only do this for the primary node or when we're running in standalone
-		if (UVirtualRealityUtilities::IsRoomMountedMode() && (UVirtualRealityUtilities::IsPrimaryNode() || GetNetMode())
-			== NM_Standalone)
+		if (UVirtualRealityUtilities::IsRoomMountedMode() && (UVirtualRealityUtilities::IsPrimaryNode() ||
+			GetNetMode() == NM_Standalone))
 		{
 			// If we are also the authority (standalone or listen server), directly attach it to us.
 			// If we are not (client), ask the server to do it.
@@ -200,6 +200,7 @@ void AVirtualRealityPawn::AttachDCRAtoPawn()
 		FAttachmentTransformRules AttachmentRules = FAttachmentTransformRules::SnapToTargetNotIncludingScale;
 		AttachmentRules.RotationRule = EAttachmentRule::KeepWorld;
 		CaveSetupActor->AttachToActor(this, AttachmentRules);
+		UE_LOGFMT(Toolkit, Display, "VirtualRealityPawn: Attaching CaveSetup to our pawn!");
 	}
 	else
 	{
-- 
GitLab