diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index af7d22dc90..bb20451474 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -112,7 +112,7 @@ namespace World, Gui, Lua, - + LuaSyncUpdate, Number, }; @@ -152,6 +152,10 @@ namespace template <> const UserStats UserStatsValue::sValue {"Lua", "lua"}; + template <> + const UserStats UserStatsValue::sValue{ " -Sync", "luasyncupdate" }; + + template struct ForEachUserStatsValue { @@ -336,10 +340,13 @@ bool OMW::Engine::frame(float frametime) // Main menu opened? Then scripts are also paused. bool paused = mWindowManager->containsMode(MWGui::GM_MainMenu); - - // Should be called after input manager update and before any change to the game world. - // It applies to the game world queued changes from the previous frame. - mLuaManager->synchronizedUpdate(); + + { + ScopedProfile profile(frameStart, frameNumber, *timer, *stats); + // Should be called after input manager update and before any change to the game world. + // It applies to the game world queued changes from the previous frame. + mLuaManager->synchronizedUpdate(); + } // update game state {