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:
parent
7d2a55bd4e
commit
ea9fcc479c
1 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue