mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 22:44:32 +00:00
attempt to fix a super rarely failing assertion
something to do with keyframe rollover
This commit is contained in:
parent
c993b49293
commit
e255e5333d
1 changed files with 10 additions and 9 deletions
|
@ -2035,16 +2035,17 @@ void AnimationLayer::updateBones()
|
|||
lastKeyframeIndex = last;
|
||||
}
|
||||
|
||||
float diff, dt;
|
||||
{
|
||||
const float t1 = key1->t;
|
||||
const float t2 = key2->t;
|
||||
assert(t1 <= t2);
|
||||
|
||||
const float diff = t2-t1;
|
||||
float dt;
|
||||
if (diff != 0)
|
||||
dt = (timer - t1)/(t2-t1);
|
||||
dt = (timer - t1)/fabsf(diff);
|
||||
else
|
||||
dt = 0;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < s->bones.size(); i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue