From ca46237d27ceec1bf7dd6da5061eeceda25a292a Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 16:02:48 +0000 Subject: [PATCH] Decompile fn_19938 (CEffectPrim::PrimGI4) Batch #11460 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_19938 CEffectPrim::PrimGI4: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Effects/EffectPrimitiveMotion.cpp | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index a94a2b7a..2542f9a4 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -4079,32 +4079,31 @@ void CEffectPrim::PrimGI4() { FollowMaster(*this); for (int index = 0; index < 4; ++index) { - EffectPrimitiveSlot& slot = this->state.slots[index]; - - if (slot.life != 1 || ++slot.process <= 0) { + if (this->state.slots[index].life != 1 || ++this->state.slots[index].process <= 0) { continue; } - slot.distance += 0.07f; - --slot.riseAngle; + this->state.slots[index].distance += 0.07f; + --this->state.slots[index].riseAngle; - if (slot.riseAngle < 10) { - slot.riseAngle = 10; + if (this->state.slots[index].riseAngle < 10) { + this->state.slots[index].riseAngle = 10; + this->state.slots[index].alphaB = 0; } - if (slot.distance >= 3.5f) { - slot.alphaB -= 3; - - if (slot.alphaB <= 0) { - slot.distance = 2.87f; - slot.riseAngle = 74; - slot.alphaB = 0; - } + if (this->state.slots[index].distance < 3.5f) { + this->state.slots[index].alphaB += 10; } else { - slot.alphaB += 10; + this->state.slots[index].alphaB -= 3; + + if (this->state.slots[index].alphaB < 1) { + this->state.slots[index].distance = 2.87f; + this->state.slots[index].riseAngle = 74; + this->state.slots[index].alphaB = 0; + } } - WaveSlotHeights(slot, index, 0.15f); + WaveSlotHeights(this->state.slots[index], index, 0.15f); } }