Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mroe of that game loop timing corner case correction

  • Loading branch information...
commit dfd76d0eb482bbd5499b850c6414e0f173bf3b34 1 parent 4d6f5e8
@AdamAtomic authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 org/flixel/FlxG.as
View
4 org/flixel/FlxG.as
@@ -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;
}
/**
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.