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).
This commit is contained in:
ragnarok-clanker 2026-11-05 15:33:39 +00:00
commit 12cdf765f8

View file

@ -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];