From dc7013d432beedfccb74ee3a81913946111e39f4 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 06:11:57 +0000 Subject: [PATCH] Decompile fn_18865 (CSpriteParticle::Draw) Batch #13728 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_18865 CSpriteParticle::Draw: logic confirmed by peer review Peer-reviewed-by: Yommy, secret, aDw Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/SpriteParticle.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Source/Contents/Effects/SpriteParticle.cpp b/Source/Contents/Effects/SpriteParticle.cpp index b65ad762b..1aea861e7 100644 --- a/Source/Contents/Effects/SpriteParticle.cpp +++ b/Source/Contents/Effects/SpriteParticle.cpp @@ -102,7 +102,7 @@ void CSpriteParticle::Draw(char mode) { this->UpdateFrame(); } - if (this->life != 0.0f && !(this->life * 60.0f > static_cast(this->unknown_00E8))) { + if (!IsParticleActive(this)) { return; } CSprRes* sprite = this->sprite; @@ -148,17 +148,7 @@ void CSpriteParticle::Draw(char mode) { record.v1 = static_cast(heightTexture->ImageHeight()) / static_cast(heightTexture->TextureHeight()); } - float u0; - float u1; - if ((cell.mirrored & 1) == 0) { - u0 = record.u0; - u1 = record.u1; - } else { - u0 = record.u1; - u1 = record.u0; - } - - this->SetQuad(this->vertices, record.v1, record.v0, u0, u1); + this->SetQuad(this->vertices, record.v1, record.v0, (cell.mirrored & 1) == 0 ? record.u0 : record.u1, (cell.mirrored & 1) == 0 ? record.u1 : record.u0); RenderPrimitive* primitive = g_renderer->primitives.Acquire(); std::memcpy(primitive->vertices, this->vertices, sizeof(this->vertices));