From 2383016b1d673fcf0ad69a08bba62d7ce36cdd76 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 30 Nov 2013 14:22:26 +0100 Subject: Added the real tick duration to the OnWorldTick hook. --- src/PluginLua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PluginLua.cpp') diff --git a/src/PluginLua.cpp b/src/PluginLua.cpp index 4ddf191ac..110010087 100644 --- a/src/PluginLua.cpp +++ b/src/PluginLua.cpp @@ -1143,13 +1143,13 @@ bool cPluginLua::OnWeatherChanging(cWorld & a_World, eWeather & a_NewWeather) -bool cPluginLua::OnWorldTick(cWorld & a_World, float a_Dt) +bool cPluginLua::OnWorldTick(cWorld & a_World, float a_Dt, int a_LastTickDurationMSec) { cCSLock Lock(m_CriticalSection); cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_WORLD_TICK]; for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) { - m_LuaState.Call((int)(**itr), &a_World, a_Dt); + m_LuaState.Call((int)(**itr), &a_World, a_Dt, a_LastTickDurationMSec); } return false; } -- cgit v1.2.3