This commit is contained in:
FlaminSarge 2025-04-04 00:44:36 -07:00 committed by GitHub
commit e9f29ca40e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1287,6 +1287,11 @@ void CMultiPlayerAnimState::UpdateGestureLayer( CStudioHdr *pStudioHdr, GestureS
// Get the current cycle.
float flCycle = pGesture->m_pAnimLayer->m_flCycle;
flCycle += pPlayer->GetSequenceCycleRate( pStudioHdr, pGesture->m_pAnimLayer->m_nSequence ) * gpGlobals->frametime * GetGesturePlaybackRate() * pGesture->m_pAnimLayer->m_flPlaybackRate;
if ( flCycle < 0.0f )
{
// if playback rate is negative, allow the animation to loop backwards
flCycle = 1.0f;
}
pGesture->m_pAnimLayer->m_flPrevCycle = pGesture->m_pAnimLayer->m_flCycle;
pGesture->m_pAnimLayer->m_flCycle = flCycle;