mirror of https://github.com/AxioDL/metaforce.git
CFBStreamedPairOfTotals: Fix jumping to end of animation
This commit is contained in:
parent
02af2c32c0
commit
ee590e670d
|
@ -202,9 +202,9 @@ void CFBStreamedPairOfTotals::SetTime(CBitLevelLoader& loader, const CCharAnimTi
|
||||||
prior = cur;
|
prior = cur;
|
||||||
priorTime = curTime;
|
priorTime = curTime;
|
||||||
x78_t = 0.f;
|
x78_t = 0.f;
|
||||||
} else
|
} else {
|
||||||
x78_t = (time - priorTime) / (curTime - priorTime);
|
x78_t = (time - priorTime) / (curTime - priorTime);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++cur;
|
++cur;
|
||||||
|
@ -218,14 +218,21 @@ void CFBStreamedPairOfTotals::SetTime(CBitLevelLoader& loader, const CCharAnimTi
|
||||||
loader.Reset();
|
loader.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (next != -1)
|
if (prior != -1 && next == -1) {
|
||||||
while (u32(next) > Next().x1c_curKey)
|
next = cur;
|
||||||
|
}
|
||||||
|
if (next != -1) {
|
||||||
|
while (u32(next) > Next().x1c_curKey) {
|
||||||
DoIncrement(loader);
|
DoIncrement(loader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!Prior().IsCalculated())
|
if (!Prior().IsCalculated()) {
|
||||||
Prior().CalculateDown();
|
Prior().CalculateDown();
|
||||||
if (!Next().IsCalculated())
|
}
|
||||||
|
if (!Next().IsCalculated()) {
|
||||||
Next().CalculateDown();
|
Next().CalculateDown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFBStreamedPairOfTotals::DoIncrement(CBitLevelLoader& loader) {
|
void CFBStreamedPairOfTotals::DoIncrement(CBitLevelLoader& loader) {
|
||||||
|
|
Loading…
Reference in New Issue