Add small value to sequence timeline for float inaccuracy.

This commit is contained in:
Nathan Sweet 2021-10-05 00:35:54 -10:00
parent f3b7d2acb2
commit 39afd0e7ea

View File

@ -2486,7 +2486,7 @@ public class Animation {
int index = modeAndIndex >> 4, count = attachment.getSequence().getRegions().length;
SequenceMode mode = SequenceMode.values[modeAndIndex & 0xf];
if (mode != SequenceMode.stop) {
index += (time - before) / delay;
index += (time - before) / delay + 0.00001f;
switch (mode) {
case once:
index = Math.min(count - 1, index);