Fix mount footstep timing and frequency

Reduced mount footsteps from 4 beats to 2 beats per animation cycle
with evenly-spaced timing at 0.25 and 0.75 normalized time. The
previous 4-beat pattern (0.1, 0.35, 0.6, 0.85) was too frequent and
not properly synced with mount animations.
This commit is contained in:
Kelsi 2026-02-09 01:15:30 -08:00
parent 980cec00bf
commit 0b6b403848

View file

@ -1273,14 +1273,14 @@ void Renderer::update(float deltaTime) {
mountFootstepNormInitialized = true;
mountFootstepLastNormTime = norm;
} else {
// Horse gait: 4 hoofbeats per cycle
// Mount gait: 2 hoofbeats per cycle (synced with animation)
auto crossed = [&](float eventNorm) {
if (mountFootstepLastNormTime <= norm) {
return mountFootstepLastNormTime < eventNorm && eventNorm <= norm;
}
return mountFootstepLastNormTime < eventNorm || eventNorm <= norm;
};
if (crossed(0.1f) || crossed(0.35f) || crossed(0.6f) || crossed(0.85f)) {
if (crossed(0.25f) || crossed(0.75f)) {
footstepManager->playFootstep(resolveFootstepSurface(), true);
}
mountFootstepLastNormTime = norm;