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).
This commit is contained in:
parent
3f8411389e
commit
c2f6f027ff
1 changed files with 3 additions and 3 deletions
|
|
@ -27,14 +27,14 @@ CWindEffect::CWindEffect() : CEffect(2343) {
|
|||
void CWindEffect::Init() {
|
||||
const float step = static_cast<float>(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<const vector3d*>(this->position), 5);
|
||||
if (!particle) {
|
||||
continue;
|
||||
}
|
||||
|
||||
particle->alpha = alpha;
|
||||
particle->SetColor(this->red, this->green, this->blue);
|
||||
particle->scale = this->particleScale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue