Decompile fn_22399 (CGndRiser::OnProcess)

Batch #15027 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review.

- fn_22399 CGndRiser::OnProcess: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, Yommy, codeplay
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-09 11:53:55 +00:00
commit 27d7cb9728

View file

@ -507,15 +507,15 @@ bool CGndRiser::OnProcess() {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
if (mode) {
const float half = static_cast<float>(this->lifetime / 2);
float alpha;
if (frame > half) {
const float rise = frame - half;
const float span = static_cast<float>(this->lifetime) * g_depthAverageHalf;
alpha = (rise * rise - span * span) / 25.0f;
} else {
alpha = -(frame * frame) / 25.0f;
const float alpha = (rise * rise - span * span) / 25.0f;
mode->scene->ground->SetGndRiseAmount(alpha, this->screenX, this->screenY);
return true;
}
const float alpha = -(frame * frame) / 25.0f;
mode->scene->ground->SetGndRiseAmount(alpha, this->screenX, this->screenY);
}