Skip to content

Commit

Permalink
mroe of that game loop timing corner case correction
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamAtomic committed Apr 28, 2011
1 parent 4d6f5e8 commit dfd76d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org/flixel/FlxG.as
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ package org.flixel
static public function set framerate(Framerate:Number):void
{
_game._step = 1000/Framerate;
if(_game._maxAccumulation < _game._step)
_game._maxAccumulation = _game._step;
}

/**
Expand All @@ -315,7 +317,7 @@ package org.flixel
_game._flashFramerate = Framerate;
if(_game.root != null)
_game.stage.frameRate = _game._flashFramerate;
_game._maxAccumulation = 2000/Framerate - 1;
_game._maxAccumulation = 2000/_game._flashFramerate - 1;
if(_game._maxAccumulation < _game._step)
_game._maxAccumulation = _game._step;
}
Expand Down

0 comments on commit dfd76d0

Please sign in to comment.