Skip to content

Commit 622d922

Browse files
committed
ENGINE_VERSION macro fixup
1 parent 20dce12 commit 622d922

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARuntimeMeshActor::ARuntimeMeshActor(const FObjectInitializer& ObjectInitializer
1111
: Super(ObjectInitializer)
1212
{
1313

14-
#if ENGINE_MAJOR_VERSION <= 4 && ENGINE_MINOR_VERSION <= 24
14+
#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION < 24
1515
bCanBeDamaged = false;
1616
#else
1717
SetCanBeDamaged(false);

Source/RuntimeMeshComponent/Private/RuntimeMeshComponentProxy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ FPrimitiveViewRelevance FRuntimeMeshComponentSceneProxy::GetViewRelevance(const
9292
Result.bDrawRelevance = IsShown(View);
9393
Result.bShadowRelevance = IsShadowCast(View);
9494

95-
#if ENGINE_MINOR_VERSION >= 26
95+
#if ENGINE_MAJOR_VERSION >= 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 26)
9696
bool bForceDynamicPath = IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe;
9797
#else
98-
bool bForceDynamicPath = IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe;
98+
bool bForceDynamicPath = !IsStaticPathAvailable() || IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe;
9999
#endif
100100
Result.bStaticRelevance = !bForceDynamicPath && RuntimeMeshProxy->ShouldRenderStatic();
101101
Result.bDynamicRelevance = bForceDynamicPath || RuntimeMeshProxy->ShouldRenderDynamic();
@@ -239,10 +239,10 @@ void FRuntimeMeshComponentSceneProxy::GetDynamicMeshElements(const TArray<const
239239
{
240240
const FSceneView* View = Views[ViewIndex];
241241

242-
#if ENGINE_MINOR_VERSION >= 26
242+
#if ENGINE_MAJOR_VERSION >= 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 26)
243243
bool bForceDynamicPath = IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected();
244244
#else
245-
bool bForceDynamicPath = IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected();
245+
bool bForceDynamicPath = !IsStaticPathAvailable() || IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected();
246246
#endif
247247

248248
if (IsShown(View) && (VisibilityMap & (1 << ViewIndex)))

0 commit comments

Comments
 (0)