From ea9fcc479c7686724483f73ba09469617a0e1f7f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 09:30:04 +0000 Subject: [PATCH] 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). --- Source/Contents/Models/ModelAnimation.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Contents/Models/ModelAnimation.cpp b/Source/Contents/Models/ModelAnimation.cpp index 17c1bbca3..c6d949c48 100644 --- a/Source/Contents/Models/ModelAnimation.cpp +++ b/Source/Contents/Models/ModelAnimation.cpp @@ -89,9 +89,15 @@ void LegacyRotationTrack::Sample(int frame, matrix& output) const { return; } - const float amount = static_cast((frame - a.frame)) / static_cast((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((frame - a.frame)) / static_cast((b.frame - a.frame)); + InterpolateModelRotation(amount, a, b, 0, result); + } + QuaternionMatrix(result, output); }