From 12cdf765f8a22330b3d92fdb3c38edbbb5aaecc1 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 15:33:39 +0000 Subject: [PATCH] Decompile fn_19985 (CEffectPrim::RenderCurvedFanTrail) Batch #12459 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_19985 CEffectPrim::RenderCurvedFanTrail: logic confirmed by peer review Peer-reviewed-by: Tanke, dori, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Effects/EffectPrimitiveArcs.cpp | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Source/Contents/Effects/EffectPrimitiveArcs.cpp b/Source/Contents/Effects/EffectPrimitiveArcs.cpp index ebd5b8f5..0aa6f33a 100644 --- a/Source/Contents/Effects/EffectPrimitiveArcs.cpp +++ b/Source/Contents/Effects/EffectPrimitiveArcs.cpp @@ -794,10 +794,16 @@ void CEffectPrim::RenderCurvedFanTrail(matrix& wtm) { angle -= 360; } - const int low = angle - 15; + int leftAngle = angle - 15; + if (leftAngle < 0) { + leftAngle += 360; + } + int rightAngle = angle + 15; + if (rightAngle >= 360) { + rightAngle -= 360; + } const int high = angle + 15; - const int leftAngle = low < 0 ? low + 360 : low; - const int rightAngle = high < 360 ? high : high - 360; + const int low = angle - 15; const int backRightAngle = high - 180 < 0 ? high - 180 + 360 : high - 180; const int backLeftAngle = low + 180 < 360 ? low + 180 : low + 180 - 360; const float rotCos = g_cosTable[slot.rotStart]; @@ -940,10 +946,16 @@ void CEffectPrim::RenderCurvedFanTrail(matrix& wtm) { angle -= 360; } - const int low = angle - 25; + int leftAngle = angle - 25; + if (leftAngle < 0) { + leftAngle += 360; + } + int rightAngle = angle + 25; + if (rightAngle >= 360) { + rightAngle -= 360; + } const int high = angle + 25; - const int leftAngle = low < 0 ? low + 360 : low; - const int rightAngle = high < 360 ? high : high - 360; + const int low = angle - 25; const int backRightAngle = high - 180 < 0 ? high - 180 + 360 : high - 180; const int backLeftAngle = low + 180 < 360 ? low + 180 : low + 180 - 360; const float rotCos = g_cosTable[slot.rotStart];