1
0

Added the real tick duration to the OnWorldTick hook.

This commit is contained in:
madmaxoft
2013-11-30 14:22:26 +01:00
parent 463de118a0
commit 2383016b1d
8 changed files with 34 additions and 17 deletions

View File

@@ -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;
}