From 53c5eb18dea0a1e2ee79802eefec84c28b84e627 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 13:44:31 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Effects/Particles/SpriteParticle.cpp, Source/Contents/Effects/Core/EffectLists.cpp, ... Batch #17005 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_18993 CEffect::Update: logic confirmed by peer review - fn_06966 ScreenAngle: logic confirmed by peer review Peer-reviewed-by: Yommy, Toshiro, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/Core/Effect.cpp | 2 +- Source/Contents/Effects/Particles/EZ2STREffectEx.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Contents/Effects/Core/Effect.cpp b/Source/Contents/Effects/Core/Effect.cpp index 981ffa0a0..bcca23e62 100644 --- a/Source/Contents/Effects/Core/Effect.cpp +++ b/Source/Contents/Effects/Core/Effect.cpp @@ -141,7 +141,7 @@ void CEffect::Update(std::uint32_t aid) { } const vector3d player = static_cast(g_modeMgr.GetGameMode())->scene->player->render.position; - for (auto event = this->events.begin(); event != this->events.end(); ++event) { + for (auto event = this->events.begin(); this->events.end() != event; ++event) { if (this->frame != event->frame) { continue; } diff --git a/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp b/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp index af718a699..32aa61a33 100644 --- a/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp +++ b/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp @@ -29,19 +29,19 @@ void CEZ2STREffectEx::EnableTimeLimit() { // OFFSET: 0x006FF780 // FUNCTION: fn_06966 float ScreenAngle(const float* from, const float* to, const float* matrix) { - float fromX; - float fromY; float fromDepth = 0.0f; - float toX; - float toY; float toDepth = 0.0f; + float fromY; + float fromX; + float toY; + float toX; g_renderer->ProjectViewport(from, matrix, &fromX, &fromY, &fromDepth); g_renderer->ProjectViewport(to, matrix, &toX, &toY, &toDepth); const float dx = toX - fromX; const float dy = toY - fromY; const float length = SquareRoot(dy * dy + dx * dx); - if (length == 0.0f) { + if (0.0f == length) { return 0.0f; }