CAnimTreeTransition: Handle negative transTimeRem (workaround)

This commit is contained in:
Luke Street 2020-09-16 14:53:29 -04:00
parent 2361916614
commit a3790c983d
1 changed files with 5 additions and 1 deletions

View File

@ -121,9 +121,13 @@ SAdvancementResults CAnimTreeTransition::VAdvanceView(const CCharAnimTime& time)
res = AdvanceViewForTransitionalPeriod(transTimeRem);
if (res.x0_remTime != transTimeRem)
return res;
// NOTE: URDE can hit an infinite loop if transTimeRem
// becomes negative (floating point inaccuracy).
// This line was moved into this branch as a workaround.
res.x0_remTime = time - transTimeRem;
}
res.x0_remTime = time - transTimeRem;
return res;
}