From ff7af22bde91af8f2fcd5d521ee6be84283909d0 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 12:33:01 +0000 Subject: [PATCH] Decompile 3 functions in Source/Contents/Effects/Particles/SpriteParticle.cpp, Source/Contents/Effects/Core/EffectLists.cpp, ... Batch #17007 by eAthena: 2 byte-identical, 1 confirmed by peer review. - fn_18861 CSpriteParticle::CSpriteParticle: byte-identical - fn_18784 EffectLists::Find: byte-identical - fn_19008 CEmitterEffect::CEmitterEffect: logic confirmed by peer review (already on main) Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/Core/EffectLists.cpp | 5 +++-- Source/Contents/Effects/Particles/EmitterEffect.cpp | 2 +- Source/Contents/Effects/Particles/SpriteParticle.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Contents/Effects/Core/EffectLists.cpp b/Source/Contents/Effects/Core/EffectLists.cpp index 7cf19c37f..91f7e2c0f 100644 --- a/Source/Contents/Effects/Core/EffectLists.cpp +++ b/Source/Contents/Effects/Core/EffectLists.cpp @@ -191,8 +191,9 @@ __declspec(noinline) std::string EffectFunctionName(std::string name) { CEffect* EffectLists::Find(int actor, int instance, int id) const { const auto found = this->active.find(actor); - if (found != this->active.end()) { - for (CEffect* effect : found->second) { + if (this->active.end() != found) { + for (auto it = found->second.begin(); found->second.end() != it; ++it) { + CEffect* effect = *it; if (effect->id == id && effect->instanceId == instance) { return effect; } diff --git a/Source/Contents/Effects/Particles/EmitterEffect.cpp b/Source/Contents/Effects/Particles/EmitterEffect.cpp index 7fd8ad1a2..5cbc7ae0e 100644 --- a/Source/Contents/Effects/Particles/EmitterEffect.cpp +++ b/Source/Contents/Effects/Particles/EmitterEffect.cpp @@ -24,7 +24,7 @@ CEmitterEffect::CEmitterEffect() : CEffect(974), velocityMin{-2.0f, 2.0f, -2.0f}, velocityMax{2.0f, -1.0f, 2.0f}, acceleration{0.7f, -2.0f, 1.0f}, spread{-1.0f, 2.0f, -1.0f}, emitCarry(0.0f), timeScale(1.0f / 60.0f), scaleMin(3.0f), scaleMax(8.0f), lifeMin(5.0f), lifeMax(10.0f), rateMin(20.0f), rateMax(100.0f), width(1.0f), height(1.0f), red(255), green(255), blue(255), alpha(255), texture("smoke2.bmp"), sourceBlend(5), destinationBlend(2), count(40), - particleSpeed(1.0f), depth(1), billboard(0), rotation{}, fixedAlpha(0), particles(), pool(), duration(-1) { + particleSpeed(1.0f), depth(1), billboard(0), rotation{0.0f, 0.0f, 0.0f}, fixedAlpha(0), particles(), pool(), duration(-1) { } // OFFSET: 0x00B4FD90 diff --git a/Source/Contents/Effects/Particles/SpriteParticle.cpp b/Source/Contents/Effects/Particles/SpriteParticle.cpp index 019c0b506..fa92ebd71 100644 --- a/Source/Contents/Effects/Particles/SpriteParticle.cpp +++ b/Source/Contents/Effects/Particles/SpriteParticle.cpp @@ -39,7 +39,7 @@ static __forceinline bool IsParticleActive(const CSpriteParticle* particle) { // OFFSET: 0x00B40B60 // FUNCTION: fn_18861 CSpriteParticle::CSpriteParticle(vector3d position, int flags) - : CParticle(position, flags), applyActorExtent(0), applyActorLift(0), velocity(), sprite(nullptr), action(nullptr) { + : CParticle(position, flags), applyActorExtent(0), applyActorLift(0), velocity({0.0f, 0.0f, 0.0f}), sprite(nullptr), action(nullptr) { this->Reset(); }