From c2f6f027ff2f31df219dadf6e7635c0b9fea361c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 16:09:13 +0000 Subject: [PATCH] Decompile fn_07539 (CWindEffect::Init) Batch #13295 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_07539 CWindEffect::Init: logic confirmed by peer review Peer-reviewed-by: Tanke, codeplay, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/WindEffect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Contents/Effects/WindEffect.cpp b/Source/Contents/Effects/WindEffect.cpp index 5b8f53ff..6d885420 100644 --- a/Source/Contents/Effects/WindEffect.cpp +++ b/Source/Contents/Effects/WindEffect.cpp @@ -27,14 +27,14 @@ CWindEffect::CWindEffect() : CEffect(2343) { void CWindEffect::Init() { const float step = static_cast(this->arcLength) / 20.0f; for (int ring = 0; ring < this->ringCount; ++ring) { - const int startAngle = std::max(rand() % 360, 0); - const int alpha = this->maxAlpha != 0 ? std::max(rand() % this->maxAlpha, 0) : 0; + const int startAngle = std::ranges::max(rand() % 360, 0); + const int maxAlpha = this->maxAlpha; + const int alpha = maxAlpha == 0 ? 0 : std::ranges::max(rand() % maxAlpha, 0); for (int segment = 0; segment < 21; ++segment) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (!particle) { continue; } - particle->alpha = alpha; particle->SetColor(this->red, this->green, this->blue); particle->scale = this->particleScale;