closed #3509: Sprites with PhysicsBody moves to wrong position when switch foreground/background.

This commit is contained in:
boyu0 2013-12-27 15:53:55 +08:00
parent 48d3e8e334
commit 1e8e15506d
1 changed files with 2 additions and 5 deletions

View File

@ -847,13 +847,10 @@ void Director::resume()
setAnimationInterval(_oldAnimationInterval); setAnimationInterval(_oldAnimationInterval);
if (gettimeofday(_lastUpdate, nullptr) != 0)
{
CCLOG("cocos2d: Director: Error in gettimeofday");
}
_paused = false; _paused = false;
_deltaTime = 0; _deltaTime = 0;
// fix issue #3509, skip one fps to avoid incorrect time calculation.
setNextDeltaTimeZero(true);
} }
// display the FPS using a LabelAtlas // display the FPS using a LabelAtlas