BobbyAnguelov / Esoterica

Esoterica Engine
https://www.esotericaengine.com
MIT License
912 stars 63 forks source link

"Handle looping sequences" clause in SyncTrack::GetTime doesn't seem to ever be executed #17

Closed IntendedConsequence closed 2 years ago

IntendedConsequence commented 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

BobbyAnguelov commented 2 years ago

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!