浏览代码

core: clamp deltatime to 15 fps to avoid erratic behaviour.

legacy
Sam Hocevar sam 12 年前
父节点
当前提交
400c75a69c
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      src/ticker.cpp

+ 7
- 0
src/ticker.cpp 查看文件

@@ -193,6 +193,13 @@ void *TickerData::GameThreadMain(void * /* p */)
data->bias += data->deltatime;
}

/* Do not go below 15 fps */
if (data->deltatime > 1.f / 15.f)
{
data->deltatime = 1.f / 15.f;
data->bias = 0.f;
}

/* If shutdown is stuck, kick the first entity we meet and see
* whether it makes things better. Note that it is always a bug to
* have referenced entities after 20 frames, but at least this


正在加载...
取消
保存