Decompile fn_06918 (CCloud::Slot07)
Batch #13789 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_06918 CCloud::Slot07: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev, Toshiro 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
b4b7ef1342
commit
4616571cae
1 changed files with 12 additions and 12 deletions
|
|
@ -46,18 +46,18 @@ void CCloud::Slot01() {
|
|||
// OFFSET: 0x006FBC30
|
||||
// FUNCTION: fn_06918
|
||||
void CCloud::Slot07() {
|
||||
this->driftX = std::max(rand() % 360, 0);
|
||||
this->driftTargetX = std::max(rand() % 360, 0);
|
||||
this->driftZ = std::max(rand() % 360, 0);
|
||||
this->driftTargetZ = std::max(rand() % 360, 0);
|
||||
this->phase = std::max(rand() % 360, 0);
|
||||
this->driftX = std::max(0, rand() % 360);
|
||||
this->driftTargetX = std::max(0, rand() % 360);
|
||||
this->driftZ = std::max(0, rand() % 360);
|
||||
this->driftTargetZ = std::max(0, rand() % 360);
|
||||
this->phase = std::max(0, rand() % 360);
|
||||
|
||||
const int scaleRange = static_cast<int>(this->scaleRange);
|
||||
const int scaleOffset = scaleRange ? std::max(rand() % scaleRange, 0) : 0;
|
||||
const int scaleOffset = scaleRange ? std::max(0, rand() % scaleRange) : 0;
|
||||
this->alpha = 0.0f;
|
||||
this->baseScale = static_cast<float>(scaleOffset) + this->scaleBase;
|
||||
this->fadeInEnd = this->fadeInBase + (this->fadeInRange ? std::max(rand() % this->fadeInRange, 0) : 0);
|
||||
this->fadeOutStart = this->fadeOutBase + (this->fadeOutRange ? std::max(rand() % this->fadeOutRange, 0) : 0);
|
||||
this->fadeInEnd = this->fadeInBase + (this->fadeInRange ? std::max(0, rand() % this->fadeInRange) : 0);
|
||||
this->fadeOutStart = this->fadeOutBase + (this->fadeOutRange ? std::max(0, rand() % this->fadeOutRange) : 0);
|
||||
|
||||
if (!this->particle) {
|
||||
return;
|
||||
|
|
@ -66,11 +66,11 @@ void CCloud::Slot07() {
|
|||
this->particle->unknown_00E8 = 0;
|
||||
CParticle* particle = this->particle;
|
||||
const int rangeZ = static_cast<int>(this->offsetRangeZ);
|
||||
const int offsetZ = rangeZ ? std::max(rand() % rangeZ, 0) : 0;
|
||||
const int offsetZ = rangeZ ? std::max(0, rand() % rangeZ) : 0;
|
||||
const int rangeY = static_cast<int>(this->offsetRangeY);
|
||||
const int offsetY = rangeY ? std::max(rand() % rangeY, 0) : 0;
|
||||
const int offsetY = rangeY ? std::max(0, rand() % rangeY) : 0;
|
||||
const int rangeX = static_cast<int>(this->offsetRangeX);
|
||||
const int offsetX = rangeX ? std::max(rand() % rangeX, 0) : 0;
|
||||
const int offsetX = rangeX ? std::max(0, rand() % rangeX) : 0;
|
||||
particle->unknown_00D0 = static_cast<float>(offsetX);
|
||||
particle->unknown_00D4 = static_cast<float>(offsetY);
|
||||
particle->unknown_00D8 = static_cast<float>(offsetZ);
|
||||
|
|
@ -78,7 +78,7 @@ void CCloud::Slot07() {
|
|||
this->particle->SetColor(this->red, this->green, this->blue);
|
||||
this->particle->alpha = 0;
|
||||
this->particle->scale = this->baseScale;
|
||||
this->particle->SetTexture(FormatOwnedString("effect\\cloud%d.tga", std::max(rand() % 4, 0) + 1).c_str());
|
||||
this->particle->SetTexture(FormatOwnedString("effect\\cloud%d.tga", std::max(0, rand() % 4) + 1).c_str());
|
||||
this->particle->SetRenderFlag(this->renderFlag);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue