From e61e97867bdcc3a8780e591abcb063972b132e7e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 11:39:52 +0000 Subject: [PATCH] Decompile fn_07045 (CJupitelThunderStormEffect::OnProcess) Batch #15625 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_07045 CJupitelThunderStormEffect::OnProcess: logic confirmed by peer review Peer-reviewed-by: eAthena, bgamez23 Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Effects/JupitelThunderStormEffect.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Contents/Effects/JupitelThunderStormEffect.cpp b/Source/Contents/Effects/JupitelThunderStormEffect.cpp index 5184a4495..bb6fe5361 100644 --- a/Source/Contents/Effects/JupitelThunderStormEffect.cpp +++ b/Source/Contents/Effects/JupitelThunderStormEffect.cpp @@ -116,22 +116,22 @@ bool CJupitelThunderStormEffect::IsAlive() { // FUNCTION: fn_07045 void CJupitelThunderStormEffect::OnProcess() { if (CParticle* particle = this->particle) { - if (ParticleAlive(particle)) { + if (!ParticleAlive(particle)) { + FreeParticle(particle); + this->particle = nullptr; + } else { vector3d position; if (this->frame < this->duration) { position.x = particle->position.x + this->step.x; position.y = particle->position.y + this->step.y; position.z = particle->position.z + this->step.z; } else { - position.x = this->sourcePosition[0]; - position.y = this->sourcePosition[1]; - position.z = this->sourcePosition[2]; + position = *reinterpret_cast(this->sourcePosition); } - particle->position = position; + particle->position.x = position.x; + particle->position.y = position.y; + particle->position.z = position.z; static_cast(this->particle)->Process(0.0f, 0.0f, 0.0f); - } else { - FreeParticle(particle); - this->particle = nullptr; } }