Closed IntendedConsequence closed 2 years ago
The check at L181 looks like it can't be true? Because it requires percentageThrough - m_syncEvents[syncEventIdx].m_startTime to be greater than m_syncEvents[syncEventIdx].m_duration, but that is just another way of writing percentageThrough > m_syncEvents[syncEventIdx].m_startTime + m_syncEvents[syncEventIdx].m_duration, and the first check at L173 makes sure that's never going to happen. Unless I'm missing something? https://github.com/BobbyAnguelov/Esoterica/blob/19c0e3cf7762a425ce63760115052d571e5ac04b/Code/Engine/Animation/AnimationSyncTrack.cpp#L173-L186
percentageThrough - m_syncEvents[syncEventIdx].m_startTime
m_syncEvents[syncEventIdx].m_duration
percentageThrough > m_syncEvents[syncEventIdx].m_startTime + m_syncEvents[syncEventIdx].m_duration
Yeh, that's a left over from when the percentage through used to have the loop count baked into it (i.e. > 1 ). I'll remove it.
Thanks for the catch!
The check at L181 looks like it can't be true? Because it requires
percentageThrough - m_syncEvents[syncEventIdx].m_startTime
to be greater thanm_syncEvents[syncEventIdx].m_duration
, but that is just another way of writingpercentageThrough > m_syncEvents[syncEventIdx].m_startTime + m_syncEvents[syncEventIdx].m_duration
, and the first check at L173 makes sure that's never going to happen. Unless I'm missing something? https://github.com/BobbyAnguelov/Esoterica/blob/19c0e3cf7762a425ce63760115052d571e5ac04b/Code/Engine/Animation/AnimationSyncTrack.cpp#L173-L186