From 1e82ada49079cf6dbcf9fb4233be0d98ff650a77 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 05:45:59 +0000 Subject: [PATCH] Decompile fn_19142 (CRotateBgEffect::Open) Batch #17955 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_19142 CRotateBgEffect::Open: 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/Skills/RotateBgEffect.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Contents/Effects/Skills/RotateBgEffect.cpp b/Source/Contents/Effects/Skills/RotateBgEffect.cpp index 4b14c17de..00c63a856 100644 --- a/Source/Contents/Effects/Skills/RotateBgEffect.cpp +++ b/Source/Contents/Effects/Skills/RotateBgEffect.cpp @@ -29,7 +29,8 @@ void CRotateBgEffect::Close() { // FUNCTION: fn_19142 void CRotateBgEffect::Open() { for (int ring = 0; ring < 2; ++ring) { - const int start = std::max(rand() % 360, 0); + const int startRoll = rand() % 360; + const int start = startRoll >= 0 ? startRoll : 0; for (int index = 0; index < 10; ++index) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { @@ -53,7 +54,8 @@ void CRotateBgEffect::Open() { int layer = 0; for (int angle = 0; angle < 360; angle += 90) { - const int span = std::max(rand() % 21, 0) + 80; + const int spanRoll = rand() % 21; + const int span = (spanRoll >= 0 ? spanRoll : 0) + 80; for (int index = 0; index < 21; ++index) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) {