Decompile fn_07010 (CFuumaShouakuEffect::Open)

Batch #18185 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_07010 CFuumaShouakuEffect::Open: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, alisonrag, bibinir
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-12 12:00:21 +00:00
commit 8a366ee987

View file

@ -50,10 +50,13 @@ void CFuumaShouakuEffect::Open() {
const float dz = target[2] - origin[2];
this->travelFrames = static_cast<int>(SquareRoot(dy * dy + dx * dx + dz * dz) * g_depthAverageHalf);
this->velocityX = target[0] - origin[0];
this->velocityY = target[1] - origin[1];
this->velocityZ = target[2] - origin[2];
const float scale = 1.0f / SquareRoot(this->velocityX * this->velocityX + this->velocityY * this->velocityY + this->velocityZ * this->velocityZ);
const float velocityX = target[0] - origin[0];
const float velocityY = target[1] - origin[1];
const float velocityZ = target[2] - origin[2];
this->velocityX = velocityX;
this->velocityY = velocityY;
this->velocityZ = velocityZ;
const float scale = 1.0f / SquareRoot(velocityX * velocityX + velocityY * velocityY + velocityZ * velocityZ);
this->velocityX = scale * this->velocityX * 2.0f;
this->velocityY = scale * this->velocityY * 2.0f;
this->velocityZ = scale * this->velocityZ * 2.0f;