From 720c7964101fda620375855986b4919789b93754 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 9 Nov 2026 22:12:36 +0000 Subject: [PATCH] Decompile fn_19848 (CEffectPrim::PrimDriftingSquares) Batch #15372 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_19848 CEffectPrim::PrimDriftingSquares: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Toshiro Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Effects/EffectPrimitiveMotion.cpp | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index 7f4f27252..9349a356c 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -4452,42 +4452,7 @@ bool CEffectPrim::PrimDriftingSquares() { } } - for (int pair = 0; pair < 8; ++pair) { - float& current = slot.height[2 * pair]; - float& target = slot.height[2 * pair + 1]; - int next; - if (target > current) { - current += 3.0f; - if (current > 359.0f) { - current = 359.0f; - } - if (current <= target) { - continue; - } - const int range = static_cast(current); - next = 0; - if (range != 0) { - const int value = std::rand() % range; - next = value >= 0 ? value : 0; - } - } else { - current -= 2.0f; - if (current < 0.0f) { - current = 0.0f; - } - if (target < current) { - continue; - } - const int range = static_cast(current); - int pick = 0; - if (range != 0) { - const int value = std::rand() % range; - pick = value >= 0 ? value : 0; - } - next = 359 - pick; - } - target = static_cast(next); - } + DriftSlotAngles(slot, 8, 3.0f, 2.0f); const char mode = slot.flag1[0]; if (mode == 1) {