From e35b77a4ac01d09565866489e41f748e90cbe964 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 15:45:59 +0000 Subject: [PATCH] Decompile fn_19018 (CEmitterEffect::UpdateParticle) Batch #18398 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_19018 CEmitterEffect::UpdateParticle: logic confirmed by peer review Peer-reviewed-by: alisonrag, kyoshi, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/Particles/EmitterEffect.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Contents/Effects/Particles/EmitterEffect.cpp b/Source/Contents/Effects/Particles/EmitterEffect.cpp index 5cbc7ae0e..731bea35e 100644 --- a/Source/Contents/Effects/Particles/EmitterEffect.cpp +++ b/Source/Contents/Effects/Particles/EmitterEffect.cpp @@ -182,7 +182,7 @@ void CEmitterEffect::UpdateParticle(CParticle* particle) { if (60.0f > particle->life * 60.0f - static_cast(age)) { const int faded = static_cast(value - fade); - particle->alpha = faded < 0 ? 0 : faded; + particle->alpha = faded >= 0 ? faded : 0; } else { const int raised = static_cast(fade + value); particle->alpha = raised > 255 ? 255 : raised; @@ -197,9 +197,9 @@ void CEmitterEffect::UpdateParticle(CParticle* particle) { particle->position.y += particle->offsetY; particle->position.z += particle->offsetZ; particle->position.x += particle->offsetX; - particle->motionVelocity.x += step * this->acceleration.x; - particle->motionVelocity.y += step * this->acceleration.y; - particle->motionVelocity.z += step * this->acceleration.z; + particle->motionVelocity.x += this->timeScale * this->acceleration.x; + particle->motionVelocity.y += this->timeScale * this->acceleration.y; + particle->motionVelocity.z += this->timeScale * this->acceleration.z; if (this->billboard == 1) { matrix transform;