Scroll after updating tier so isScrolling() returns accurately.

This commit is contained in:
Aloshi 2014-02-07 22:17:24 -06:00
parent 1aa291ebe7
commit 63749d2d9d

View file

@ -160,10 +160,11 @@ protected:
mScrollCursorAccumulator += deltaTime; mScrollCursorAccumulator += deltaTime;
mScrollTierAccumulator += deltaTime; mScrollTierAccumulator += deltaTime;
int scrollCount = 0;
while(mScrollCursorAccumulator >= SCROLL_SPEED[mScrollTier].scrollDelay) while(mScrollCursorAccumulator >= SCROLL_SPEED[mScrollTier].scrollDelay)
{ {
mScrollCursorAccumulator -= SCROLL_SPEED[mScrollTier].scrollDelay; mScrollCursorAccumulator -= SCROLL_SPEED[mScrollTier].scrollDelay;
scroll(mScrollVelocity); scrollCount++;
} }
// are we ready to go even FASTER? // are we ready to go even FASTER?
@ -172,6 +173,9 @@ protected:
mScrollTierAccumulator -= SCROLL_SPEED[mScrollTier].length; mScrollTierAccumulator -= SCROLL_SPEED[mScrollTier].length;
mScrollTier++; mScrollTier++;
} }
for(int i = 0; i < scrollCount; i++)
scroll(mScrollVelocity);
} }
void scroll(int amt) void scroll(int amt)