lua signals, processes implemented

This commit is contained in:
turanszkij
2015-08-14 14:31:13 +02:00
parent 310fd3b3a6
commit ff330b180d
4 changed files with 111 additions and 4 deletions
+5 -3
View File
@@ -48,14 +48,16 @@ void MainComponent::run()
{
static wiTimer timer = wiTimer();
static double accumulator = 0.0;
const double elapsedTime = timer.elapsed() / 1000.0;
timer.record();
wiLua::GetGlobal()->SetDeltaTime(elapsedTime);
if (frameskip)
{
accumulator += timer.elapsed() / 1000.0;
accumulator += elapsedTime;
if (accumulator > applicationControlLostThreshold) //application probably lost control
accumulator = 0;
timer.record();
while (accumulator >= targetFrameRateInv)
{