1
0
Fork 0
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:
fgenesis 2025-03-05 03:33:14 +01:00
parent c993b49293
commit e255e5333d

View file

@ -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++)
{