From 5be3d0e44fb319c35346751a9a3029d327d46bbb Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 12:23:43 +0000 Subject: [PATCH] Decompile fn_19105 (CLightSphereEffect::sub_B6CB90) Batch #13256 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_19105 CLightSphereEffect::sub_B6CB90: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/LightSphereEffect.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Source/Contents/Effects/LightSphereEffect.cpp b/Source/Contents/Effects/LightSphereEffect.cpp index fd4ed58d..4ac5e574 100644 --- a/Source/Contents/Effects/LightSphereEffect.cpp +++ b/Source/Contents/Effects/LightSphereEffect.cpp @@ -43,7 +43,8 @@ void CLightSphereEffect::sub_B6CB90(int param) { particle->unknown_0054 = 10.0f; *reinterpret_cast(particle->unknown_0058) = static_cast(param); - if (this->id == 0x4AD) { + switch (this->id) { + case 0x4AD: { int randVal = std::rand() % 2; if (randVal < 0) { randVal = 0; @@ -53,7 +54,9 @@ void CLightSphereEffect::sub_B6CB90(int param) { } else { particle->SetColor(0xFF, 0x4A, 0x4E); } - } else if (this->id == 0x4AE) { + break; + } + case 0x4AE: { int randVal = std::rand() % 2; if (randVal < 0) { randVal = 0; @@ -63,7 +66,9 @@ void CLightSphereEffect::sub_B6CB90(int param) { } else { particle->SetColor(0xFF, 0xFF, 0x37); } - } else if (this->id == 0x4AF) { + break; + } + case 0x4AF: { int randVal = std::rand() % 2; if (randVal < 0) { randVal = 0; @@ -73,7 +78,9 @@ void CLightSphereEffect::sub_B6CB90(int param) { } else { particle->SetColor(0x6D, 0x9A, 0xFF); } - } else { + break; + } + default: { int randVal = std::rand() % 2; if (randVal < 0) { randVal = 0; @@ -83,6 +90,8 @@ void CLightSphereEffect::sub_B6CB90(int param) { } else { particle->SetColor(0x37, 0x37, 0xFF); } + break; + } } InitParticleQuad(particle->vertices);