Skip to content

Commit

Permalink
ENGINE_VERSION macro fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjak committed May 25, 2022
1 parent 20dce12 commit 622d922
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARuntimeMeshActor::ARuntimeMeshActor(const FObjectInitializer& ObjectInitializer
: Super(ObjectInitializer)
{

#if ENGINE_MAJOR_VERSION <= 4 && ENGINE_MINOR_VERSION <= 24
#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION < 24
bCanBeDamaged = false;
#else
SetCanBeDamaged(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ FPrimitiveViewRelevance FRuntimeMeshComponentSceneProxy::GetViewRelevance(const
Result.bDrawRelevance = IsShown(View);
Result.bShadowRelevance = IsShadowCast(View);

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

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

if (IsShown(View) && (VisibilityMap & (1 << ViewIndex)))
Expand Down

0 comments on commit 622d922

Please sign in to comment.