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()
return;
//Input config
if (UVirtualRealityUtilities::IsMaster())
if (UVirtualRealityUtilities::IsPrimaryNode())
{
if (CycleDoorTypeInputAction == nullptr || IMCCaveOverlayInputMapping == nullptr)
{
......
......@@ -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())
{
......
......@@ -2,12 +2,13 @@
#include "Serialization/MemoryReader.h"
#include "Serialization/MemoryWriter.h"
#include "type_traits"
template <typename ParameterType, typename... RemainingParameterTypes>
inline void SerializeParameters(FMemoryWriter* MemoryWriter, ParameterType&& Parameter,
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
(*MemoryWriter) << const_cast<NonConstType&>(Parameter);
SerializeParameters(MemoryWriter, Forward<RemainingParameterTypes>(RemainingParameters)...);
......@@ -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
// 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.
FillArgumentTuple<0>(&ArgumentTuple, Parameters);
......
......@@ -5,7 +5,6 @@
#include "Cluster/DisplayClusterClusterEvent.h"
#include "DisplayClusterEventParameterHelper.h"
#include "Templates/IsInvocable.h"
#include "Templates/RemoveCV.h"
static constexpr int32 CLUSTER_EVENT_WRAPPER_EVENT_ID = 1337420;
......@@ -69,7 +68,7 @@ public:
// 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.
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.
FillArgumentTuple<0>(&MemoryReader, &ArgumentTuple);
......
......@@ -69,9 +69,9 @@ void AVirtualRealityPawn::NotifyControllerChanged()
// Only do this for all local controlled pawns
if (IsLocallyControlled())
{
// Only do this for the master or when we're running in standalone
if (UVirtualRealityUtilities::IsRoomMountedMode() && (UVirtualRealityUtilities::IsMaster() || GetNetMode()) ==
NM_Standalone)
// Only do this for the primary node or when we're running in 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.
......
......@@ -81,8 +81,8 @@ bool UVirtualRealityUtilities::IsRolv()
#endif
}
/* Return true on the Master in cluster mode and in a normal desktop session. Otherwise false */
bool UVirtualRealityUtilities::IsMaster()
/* Return true on the Primary in cluster mode and in a normal desktop session. Otherwise false */
bool UVirtualRealityUtilities::IsPrimaryNode()
{
#if PLATFORM_SUPPORTS_NDISPLAY
if (!IDisplayCluster::IsAvailable())
......@@ -92,7 +92,7 @@ bool UVirtualRealityUtilities::IsMaster()
IDisplayClusterClusterManager* Manager = IDisplayCluster::Get().GetClusterMgr();
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();
#else
......@@ -100,9 +100,9 @@ bool UVirtualRealityUtilities::IsMaster()
#endif
}
bool UVirtualRealityUtilities::IsSlave()
bool UVirtualRealityUtilities::IsSecondaryNode()
{
return !IsMaster();
return !IsPrimaryNode();
}
FString UVirtualRealityUtilities::GetNodeName()
......
......@@ -75,7 +75,7 @@ private:
UPROPERTY(VisibleAnywhere)
UCapsuleComponent* CapsuleColliderComponent = nullptr;
UPROPERTY()
UPROPERTY(VisibleAnywhere, Transient, DuplicateTransient)
USceneComponent* HeadComponent = nullptr;
float VerticalSpeed = 0.0f;
......@@ -83,6 +83,6 @@ private:
FVector LastSteeringCollisionVector;
//just stored for performance gains;
UPROPERTY()
UPROPERTY(VisibleAnywhere, Transient, DuplicateTransient)
TArray<AActor*> ActorsToIgnore;
};
......@@ -63,9 +63,9 @@ public:
static bool IsRolv();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsMaster();
static bool IsPrimaryNode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsSlave();
static bool IsSecondaryNode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static FString GetNodeName();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment