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

style(replication): updates formatting to make clang format happy

parent 23c33f1b
No related branches found
No related tags found
2 merge requests!107UE5.4-2024.1-rc1,!98Improved join/attachment logic for clusters to support multi-cluster connections at some point
Pipeline #440273 failed
......@@ -267,14 +267,16 @@ void ARWTHVRPawn::AttachClustertoPawn()
if (const ARWTHVRPlayerState* State = GetPlayerState<ARWTHVRPlayerState>())
{
if (!State->GetCorrespondingClusterActor())
UE_LOGFMT(Toolkit, Error,
UE_LOGFMT(
Toolkit, Error,
"ARWTHVRPawn::AttachClustertoPawn: GetCorrespondingClusterActor returned null! This won't work on "
"the Cave.");
const FAttachmentTransformRules AttachmentRules = FAttachmentTransformRules::SnapToTargetNotIncludingScale;
bool bAttached = State->GetCorrespondingClusterActor()->AttachToComponent(GetRootComponent(), AttachmentRules);
// State->GetCorrespondingClusterActor()->OnAttached();
UE_LOGFMT(Toolkit, Display, "ARWTHVRPawn: Attaching corresponding cluster actor to our pawn returned: {Attached}", bAttached);
UE_LOGFMT(Toolkit, Display,
"ARWTHVRPawn: Attaching corresponding cluster actor to our pawn returned: {Attached}", bAttached);
}
else
{
......
......@@ -17,7 +17,6 @@ class RWTHVRTOOLKIT_API ARWTHVRGameModeBase : public AGameModeBase
{
GENERATED_BODY()
public:
ARWTHVRGameModeBase(const FObjectInitializer& ObjectInitializer);
protected:
......@@ -35,7 +34,6 @@ protected:
virtual void PostLogin(APlayerController* NewPlayer) override;
private:
UPROPERTY()
TMap<int32, AClusterRepresentationActor*> ConnectedClusters;
};
......@@ -28,20 +28,19 @@ private:
EPlayerType PlayerType = EPlayerType::Desktop;
/** Replicated cluster ID for this player. Is -1 in case player is not a cluster*/
UPROPERTY(Replicated, Category = PlayerState, BlueprintGetter = GetCorrespondingClusterId, meta = (AllowPrivateAccess))
UPROPERTY(Replicated, Category = PlayerState, BlueprintGetter = GetCorrespondingClusterId,
meta = (AllowPrivateAccess))
int32 CorrespondingClusterId = -1;
/** Replicated cluster actor for this player. Is nullptr in case player is not a cluster.
* As this is not guaranteed to be valid on BeginPlay, we need to do a callback to the CorrespondingClusterActor here...
* As this is not guaranteed to be valid on BeginPlay, we need to do a callback to the CorrespondingClusterActor
* here...
*/
UPROPERTY(ReplicatedUsing = OnRep_CorrespondingClusterActor)
TObjectPtr<AClusterRepresentationActor> CorrespondingClusterActor;
UFUNCTION()
virtual void OnRep_CorrespondingClusterActor()
{
CorrespondingClusterActor->AttachDCRAIfRequired(this);
}
virtual void OnRep_CorrespondingClusterActor() { CorrespondingClusterActor->AttachDCRAIfRequired(this); }
UFUNCTION(Reliable, Server)
void ServerSetPlayerTypeRpc(EPlayerType NewPlayerType);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment