Decompile fn_01723 (LegacyRotationTrack::Sample)

Batch #15614 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_01723 LegacyRotationTrack::Sample: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, eAthena
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-10 09:30:04 +00:00
commit ea9fcc479c

View file

@ -89,9 +89,15 @@ void LegacyRotationTrack::Sample(int frame, matrix& output) const {
return;
}
const float amount = static_cast<float>((frame - a.frame)) / static_cast<float>((b.frame - a.frame));
ModelRotationKey result;
InterpolateModelRotation(amount, a, b, 0, result);
if (next == 0) {
InterpolateModelRotation(0.0f, keys[0], keys[1], 0, result);
} else {
const float amount = static_cast<float>((frame - a.frame)) / static_cast<float>((b.frame - a.frame));
InterpolateModelRotation(amount, a, b, 0, result);
}
QuaternionMatrix(result, output);
}