mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-23 01:30:58 +00:00
Add drawerlib deltaTime function
This commit is contained in:
parent
4095ef599b
commit
f418c6476f
1 changed files with 9 additions and 0 deletions
|
@ -1201,6 +1201,14 @@ static int libd_getusertransflag(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return the time elapsed for the previous frame, in tics.
|
||||||
|
static int libd_deltaTime(lua_State *L)
|
||||||
|
{
|
||||||
|
HUDONLY
|
||||||
|
lua_pushfixed(L, renderdeltatics);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static luaL_Reg lib_draw[] = {
|
static luaL_Reg lib_draw[] = {
|
||||||
// cache
|
// cache
|
||||||
{"patchExists", libd_patchExists},
|
{"patchExists", libd_patchExists},
|
||||||
|
@ -1242,6 +1250,7 @@ static luaL_Reg lib_draw[] = {
|
||||||
{"renderer", libd_renderer},
|
{"renderer", libd_renderer},
|
||||||
{"localTransFlag", libd_getlocaltransflag},
|
{"localTransFlag", libd_getlocaltransflag},
|
||||||
{"userTransFlag", libd_getusertransflag},
|
{"userTransFlag", libd_getusertransflag},
|
||||||
|
{"deltaTime", libd_deltaTime},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue