mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 01:21:39 +00:00
Merge branch 'lua_real_frame_time' into 'master'
Pass real frame duration to onFrame See merge request OpenMW/openmw!3621
This commit is contained in:
commit
7e162a0d7c
@ -86,6 +86,7 @@ namespace MWLua
|
||||
api["getRealTime"] = []() {
|
||||
return std::chrono::duration<double>(std::chrono::steady_clock::now().time_since_epoch()).count();
|
||||
};
|
||||
api["getRealFrameDuration"] = []() { return MWBase::Environment::get().getFrameDuration(); };
|
||||
|
||||
if (!global)
|
||||
return;
|
||||
|
@ -55,6 +55,11 @@
|
||||
-- @function [parent=#core] getRealTime
|
||||
-- @return #number
|
||||
|
||||
---
|
||||
-- Frame duration in seconds
|
||||
-- @function [parent=#core] getRealFrameDuration
|
||||
-- @return #number
|
||||
|
||||
---
|
||||
-- Get a GMST setting from content files.
|
||||
-- @function [parent=#core] getGMST
|
||||
|
@ -111,6 +111,11 @@
|
||||
-- @function [parent=#world] setGameTimeScale
|
||||
-- @param #number ratio
|
||||
|
||||
---
|
||||
-- Frame duration in seconds
|
||||
-- @function [parent=#world] getRealFrameDuration
|
||||
-- @return #number
|
||||
|
||||
---
|
||||
-- Whether the world is paused (onUpdate doesn't work when the world is paused).
|
||||
-- @function [parent=#world] isWorldPaused
|
||||
|
Loading…
x
Reference in New Issue
Block a user