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

Merge branch 'dev/5.3' of...

Merge branch 'dev/5.3' of git-ce.rwth-aachen.de:vr-vis/VR-Group/unreal-development/plugins/rwth-vr-toolkit into dev/5.3
parents f8f5a90c 79ddbeb5
No related branches found
No related tags found
No related merge requests found
...@@ -156,7 +156,7 @@ void ACAVEOverlayController::BeginPlay() ...@@ -156,7 +156,7 @@ void ACAVEOverlayController::BeginPlay()
return; return;
//Input config //Input config
if (UVirtualRealityUtilities::IsMaster()) if (UVirtualRealityUtilities::IsPrimaryNode())
{ {
if (CycleDoorTypeInputAction == nullptr || IMCCaveOverlayInputMapping == nullptr) if (CycleDoorTypeInputAction == nullptr || IMCCaveOverlayInputMapping == nullptr)
{ {
......
...@@ -39,9 +39,9 @@ void ACaveSetup::BeginPlay() ...@@ -39,9 +39,9 @@ void ACaveSetup::BeginPlay()
} }
} }
// Apply the DTrack LiveLink Preset. Only do this if we are the master // Apply the DTrack LiveLink Preset. Only do this if we are the primaryNode
if (UVirtualRealityUtilities::IsMaster()) if (UVirtualRealityUtilities::IsPrimaryNode())
{ {
if (LiveLinkPresetToApplyOnCave && LiveLinkPresetToApplyOnCave->IsValidLowLevelFast()) if (LiveLinkPresetToApplyOnCave && LiveLinkPresetToApplyOnCave->IsValidLowLevelFast())
{ {
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
#include "Serialization/MemoryReader.h" #include "Serialization/MemoryReader.h"
#include "Serialization/MemoryWriter.h" #include "Serialization/MemoryWriter.h"
#include "type_traits"
template <typename ParameterType, typename... RemainingParameterTypes> template <typename ParameterType, typename... RemainingParameterTypes>
inline void SerializeParameters(FMemoryWriter* MemoryWriter, ParameterType&& Parameter, inline void SerializeParameters(FMemoryWriter* MemoryWriter, ParameterType&& Parameter,
RemainingParameterTypes&&... RemainingParameters) RemainingParameterTypes&&... RemainingParameters)
{ {
using NonConstType = typename TRemoveCV<typename TRemoveReference<ParameterType>::Type>::Type; using NonConstType = typename std::remove_cv_t<typename TRemoveReference<ParameterType>::Type>;
// const_cast because the same operator (<<) is used for reading and writing // const_cast because the same operator (<<) is used for reading and writing
(*MemoryWriter) << const_cast<NonConstType&>(Parameter); (*MemoryWriter) << const_cast<NonConstType&>(Parameter);
SerializeParameters(MemoryWriter, Forward<RemainingParameterTypes>(RemainingParameters)...); SerializeParameters(MemoryWriter, Forward<RemainingParameterTypes>(RemainingParameters)...);
...@@ -44,7 +45,7 @@ inline RetType CallDelegateWithParameterMap( ...@@ -44,7 +45,7 @@ inline RetType CallDelegateWithParameterMap(
{ {
// Create a tuple that holds all arguments. This assumes that all argument types are default constructible. However, all // Create a tuple that holds all arguments. This assumes that all argument types are default constructible. However, all
// types that overload the FArchive "<<" operator probably are. // types that overload the FArchive "<<" operator probably are.
TTuple<typename TRemoveCV<typename TRemoveReference<ArgTypes>::Type>::Type...> ArgumentTuple; TTuple<typename std::remove_cv_t<typename TRemoveReference<ArgTypes>::Type>...> ArgumentTuple;
// This call will parse the string map and fill all values in the tuple appropriately. // This call will parse the string map and fill all values in the tuple appropriately.
FillArgumentTuple<0>(&ArgumentTuple, Parameters); FillArgumentTuple<0>(&ArgumentTuple, Parameters);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "Cluster/DisplayClusterClusterEvent.h" #include "Cluster/DisplayClusterClusterEvent.h"
#include "DisplayClusterEventParameterHelper.h" #include "DisplayClusterEventParameterHelper.h"
#include "Templates/IsInvocable.h" #include "Templates/IsInvocable.h"
#include "Templates/RemoveCV.h"
static constexpr int32 CLUSTER_EVENT_WRAPPER_EVENT_ID = 1337420; static constexpr int32 CLUSTER_EVENT_WRAPPER_EVENT_ID = 1337420;
...@@ -69,7 +68,7 @@ public: ...@@ -69,7 +68,7 @@ public:
// Create a tuple that holds all arguments. This assumes that all // Create a tuple that holds all arguments. This assumes that all
// argument types are default constructible. However, all // argument types are default constructible. However, all
// types that overload the FArchive "<<" operator probably are. // types that overload the FArchive "<<" operator probably are.
TTuple<typename TRemoveCV<typename TRemoveReference<ArgTypes>::Type>::Type...> ArgumentTuple; TTuple<typename std::remove_cv_t<typename TRemoveReference<ArgTypes>::Type>...> ArgumentTuple;
// This call will deserialze the values and fill all values in the tuple appropriately. // This call will deserialze the values and fill all values in the tuple appropriately.
FillArgumentTuple<0>(&MemoryReader, &ArgumentTuple); FillArgumentTuple<0>(&MemoryReader, &ArgumentTuple);
......
...@@ -69,9 +69,9 @@ void AVirtualRealityPawn::NotifyControllerChanged() ...@@ -69,9 +69,9 @@ void AVirtualRealityPawn::NotifyControllerChanged()
// Only do this for all local controlled pawns // Only do this for all local controlled pawns
if (IsLocallyControlled()) if (IsLocallyControlled())
{ {
// Only do this for the master or when we're running in standalone // Only do this for the primary node or when we're running in standalone
if (UVirtualRealityUtilities::IsRoomMountedMode() && (UVirtualRealityUtilities::IsMaster() || GetNetMode()) == if (UVirtualRealityUtilities::IsRoomMountedMode() && (UVirtualRealityUtilities::IsPrimaryNode() || GetNetMode())
NM_Standalone) == NM_Standalone)
{ {
// If we are also the authority (standalone or listen server), directly attach it to us. // 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. // If we are not (client), ask the server to do it.
......
...@@ -81,8 +81,8 @@ bool UVirtualRealityUtilities::IsRolv() ...@@ -81,8 +81,8 @@ bool UVirtualRealityUtilities::IsRolv()
#endif #endif
} }
/* Return true on the Master in cluster mode and in a normal desktop session. Otherwise false */ /* Return true on the Primary in cluster mode and in a normal desktop session. Otherwise false */
bool UVirtualRealityUtilities::IsMaster() bool UVirtualRealityUtilities::IsPrimaryNode()
{ {
#if PLATFORM_SUPPORTS_NDISPLAY #if PLATFORM_SUPPORTS_NDISPLAY
if (!IDisplayCluster::IsAvailable()) if (!IDisplayCluster::IsAvailable())
...@@ -92,7 +92,7 @@ bool UVirtualRealityUtilities::IsMaster() ...@@ -92,7 +92,7 @@ bool UVirtualRealityUtilities::IsMaster()
IDisplayClusterClusterManager* Manager = IDisplayCluster::Get().GetClusterMgr(); IDisplayClusterClusterManager* Manager = IDisplayCluster::Get().GetClusterMgr();
if (Manager == nullptr) if (Manager == nullptr)
{ {
return true; // if we are not in cluster mode, we are always the master return true; // if we are not in cluster mode, we are always the primary node
} }
return Manager->IsPrimary() || !Manager->IsSecondary(); return Manager->IsPrimary() || !Manager->IsSecondary();
#else #else
...@@ -100,9 +100,9 @@ bool UVirtualRealityUtilities::IsMaster() ...@@ -100,9 +100,9 @@ bool UVirtualRealityUtilities::IsMaster()
#endif #endif
} }
bool UVirtualRealityUtilities::IsSlave() bool UVirtualRealityUtilities::IsSecondaryNode()
{ {
return !IsMaster(); return !IsPrimaryNode();
} }
FString UVirtualRealityUtilities::GetNodeName() FString UVirtualRealityUtilities::GetNodeName()
......
...@@ -75,7 +75,7 @@ private: ...@@ -75,7 +75,7 @@ private:
UPROPERTY(VisibleAnywhere) UPROPERTY(VisibleAnywhere)
UCapsuleComponent* CapsuleColliderComponent = nullptr; UCapsuleComponent* CapsuleColliderComponent = nullptr;
UPROPERTY() UPROPERTY(VisibleAnywhere, Transient, DuplicateTransient)
USceneComponent* HeadComponent = nullptr; USceneComponent* HeadComponent = nullptr;
float VerticalSpeed = 0.0f; float VerticalSpeed = 0.0f;
...@@ -83,6 +83,6 @@ private: ...@@ -83,6 +83,6 @@ private:
FVector LastSteeringCollisionVector; FVector LastSteeringCollisionVector;
//just stored for performance gains; //just stored for performance gains;
UPROPERTY() UPROPERTY(VisibleAnywhere, Transient, DuplicateTransient)
TArray<AActor*> ActorsToIgnore; TArray<AActor*> ActorsToIgnore;
}; };
...@@ -63,9 +63,9 @@ public: ...@@ -63,9 +63,9 @@ public:
static bool IsRolv(); static bool IsRolv();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsMaster(); static bool IsPrimaryNode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsSlave(); static bool IsSecondaryNode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static FString GetNodeName(); static FString GetNodeName();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment