CAnimTreeSequence: Add EpsilonZero check

This commit is contained in:
Luke Street 2020-04-30 02:16:50 -04:00
parent 3570ed8e24
commit 973eb622c7
1 changed files with 3 additions and 2 deletions

View File

@ -53,7 +53,8 @@ SAdvancementResults CAnimTreeSequence::VAdvanceView(const CCharAnimTime& dt) {
}
CCharAnimTime remTime = dt;
while (remTime.GreaterThanZero() && x38_curIdx < x28_sequence.size()) {
// Note: EpsilonZero check added
while (remTime.GreaterThanZero() && !remTime.EpsilonZero() && x38_curIdx < x28_sequence.size()) {
CCharAnimTime chRem = curChild->VGetTimeRemaining();
if (chRem.EqualsZero()) {
++x38_curIdx;
@ -86,7 +87,7 @@ SAdvancementResults CAnimTreeSequence::VAdvanceView(const CCharAnimTime& dt) {
CCharAnimTime CAnimTreeSequence::VGetTimeRemaining() const {
if (x38_curIdx == x28_sequence.size() - 1)
return x14_child->VGetTimeRemaining();
return x3c_fundamentals.GetSteadyStateAnimInfo().GetDuration() - x94_curTime.GetSeconds();
return x3c_fundamentals.GetSteadyStateAnimInfo().GetDuration() - x94_curTime;
}
CSteadyStateAnimInfo CAnimTreeSequence::VGetSteadyStateAnimInfo() const {