From 2c1e838844dece036ce171acca2dd698492e46cd Mon Sep 17 00:00:00 2001 From: mix Date: Fri, 15 Aug 2025 07:07:36 +0100 Subject: [PATCH] Change metal support type b crossbeam offset index magic num to const --- src/openrct2/paint/support/MetalSupports.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openrct2/paint/support/MetalSupports.cpp b/src/openrct2/paint/support/MetalSupports.cpp index 8cb59522a8..3e859d125b 100644 --- a/src/openrct2/paint/support/MetalSupports.cpp +++ b/src/openrct2/paint/support/MetalSupports.cpp @@ -284,6 +284,7 @@ constexpr MetalSupportGraphic kMetalSupportGraphicRotated[kMetalSupportTypeCount constexpr const int32_t kMetalSupportBaseHeight = 6; constexpr const int32_t kMetalSupportMaxSectionHeight = 16; constexpr const int32_t kMetalSupportJointInterval = 4; +constexpr const int32_t kMetalSupportCrossbeamTwoSegmentOffsetIndex = 4; static inline MetalSupportGraphic RotateMetalSupportGraphic(MetalSupportType supportType, Direction direction); @@ -347,7 +348,7 @@ static bool MetalSupportsPaintSetupCommon( const uint8_t crossBeamIndex = kMetalSupportSegmentOffsets[baseIndex + segment * 8 + 1]; if constexpr (typeB) { - if (crossBeamIndex >= 4) + if (crossBeamIndex >= kMetalSupportCrossbeamTwoSegmentOffsetIndex) return false; }