From ff532a9ae372e513c5be046f5c2d60972102d7f5 Mon Sep 17 00:00:00 2001
From: David Gilbert <gilbert@vr.rwth-aachen.de>
Date: Wed, 28 Aug 2024 12:36:24 +0200
Subject: [PATCH] fix(cave, replication): Adds DisplayClusterSyncComponent back
 on attachment. Should close #659

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

diff --git a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
index 90f6d25b..810a6205 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
@@ -263,7 +263,6 @@ void ARWTHVRPawn::MulticastAddDCSyncComponent_Implementation()
 // It is only executed on the server because attachments are synced to all clients, but not from client to server.
 void ARWTHVRPawn::AttachClustertoPawn()
 {
-
 	if (const ARWTHVRPlayerState* State = GetPlayerState<ARWTHVRPlayerState>())
 	{
 		const auto ClusterActor = State->GetCorrespondingClusterActor();
@@ -287,8 +286,8 @@ void ARWTHVRPawn::AttachClustertoPawn()
 				  "ARWTHVRPawn::AttachClustertoPawn: No ARWTHVRPlayerState set! This won't work on the Cave.");
 	}
 
-	// if (HasAuthority()) // Should always be the case here, but double check
-	//	MulticastAddDCSyncComponent();
+	if (HasAuthority()) // Should always be the case here, but double check
+		MulticastAddDCSyncComponent();
 }
 
 void ARWTHVRPawn::SetupMotionControllerSources()
-- 
GitLab