From 2c35b2a77bed9fdfe1000a7c3a017fb373ea783d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 4 Nov 2026 17:06:58 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Effects/EffectPrimitiveMotion.cpp Batch #10526 by Toshiro: 0 byte-identical, 2 confirmed by peer review. - fn_19801 CEffectPrim::PrimAuraGlow: logic confirmed by peer review - fn_19812 CEffectPrim::PrimGrowFollow: logic confirmed by peer review Peer-reviewed-by: Lumen, dori, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Effects/EffectPrimitiveMotion.cpp | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index 957d042e..7de7804e 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -5185,7 +5185,10 @@ void CEffectPrim::PrimTrailShift() { // OFFSET: 0x00BBE960 // FUNCTION: fn_19812 void CEffectPrim::PrimGrowFollow() { - this->render.position = this->state.master->render.position; + const CRagEffect* master = this->state.master; + this->render.position.x = master->render.position.x; + this->render.position.y = master->render.position.y; + this->render.position.z = master->render.position.z; for (int index = 0; index < 4; ++index) { EffectPrimitiveSlot& slot = this->state.slots[index]; @@ -5201,7 +5204,11 @@ void CEffectPrim::PrimGrowFollow() { } if (slot.process <= 10) { - slot.alphaB = static_cast(slot.alphaB + (this->state.size != 113.0f ? 2 : 6)); + if (this->state.size == 113.0f) { + slot.alphaB += 6; + } else { + slot.alphaB += 2; + } } slot.distance *= 1.07f; @@ -6773,7 +6780,15 @@ void CEffectPrim::PrimFadingColumns() { // FUNCTION: fn_19801 void CEffectPrim::PrimAuraGlow() { EffectPrimitiveSlot* slots = this->state.slots; - FaceCamera(slots); + const CView* view = static_cast(g_modeMgr.GetGameMode())->camera; + const short yaw = static_cast(static_cast(view->camera.yaw)); + const short pitch = static_cast(-static_cast(view->camera.pitch)); + slots[0].alphaT = static_cast(360 - yaw); + const short anglePitch = static_cast(pitch + 450); + slots[1].alphaT = anglePitch; + if (anglePitch >= 360) { + slots[1].alphaT = static_cast(pitch + 90); + } const CRagEffect* master = this->state.master; this->render.position.x = master->render.position.x; @@ -6834,9 +6849,10 @@ void CEffectPrim::PrimAuraGlow() { if (kind == 2) { if (slot.process > 40) { - slot.alphaB += slot.process >= 62 ? -8 : 8; + const short alpha = static_cast(slot.alphaB + (slot.process >= 62 ? -8 : 8)); + slot.alphaB = alpha; - if (slot.alphaB > 0) { + if (alpha > 0) { slot.distance += 0.7f; } }