From 40aecd6cf774347ae8eea91b0cfb7964d7d9018d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 10:53:18 +0000 Subject: [PATCH] Decompile fn_19794 (CEffectPrim::PrimDriftingOrbs) Batch #18114 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_19794 CEffectPrim::PrimDriftingOrbs: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Effects/Primitives/EffectPrimitiveMotion.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Contents/Effects/Primitives/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/Primitives/EffectPrimitiveMotion.cpp index 6bcb98dfc..79cba0a39 100644 --- a/Source/Contents/Effects/Primitives/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/Primitives/EffectPrimitiveMotion.cpp @@ -7449,8 +7449,9 @@ bool CEffectPrim::PrimDriftingOrbs() { const char kind = slot.flag1[0]; - if (kind != 0 && kind < 20 && kind > 9) { - if (this->state.isChangeProcessed == 0) { + if (kind != 0 && kind < 20 && kind >= 10) { + switch (this->state.isChangeProcessed) { + case 0: if (slot.process % (kind - 9) == 0) { slot.height[6] += 1.0f; @@ -7461,7 +7462,8 @@ bool CEffectPrim::PrimDriftingOrbs() { slot.distance = 6.0f; slot.height[7] = -15.0f; - } else if (this->state.isChangeProcessed == 1) { + break; + case 1: if (slot.process % (kind - 9) == 0) { slot.height[6] += 15.0f; @@ -7481,6 +7483,7 @@ bool CEffectPrim::PrimDriftingOrbs() { if (slot.distance >= 10.0f) { slot.distance = 10.0f; } + break; } } else if (kind == 0 || kind >= 20 || (slot.process & 1) == 0) { slot.height[6] += 1.0f;