diff options
author | Mattes D <github@xoft.cz> | 2013-12-11 17:02:45 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-12-11 17:02:45 +0100 |
commit | 7035d31e9d8f4d25efc722cb3d2a49fb756249ee (patch) | |
tree | 75dd002246aa046a67c6675e9f3a4f93bb644e33 /src/Bindings/PluginLua.cpp | |
parent | ExpOrbs now move. (diff) | |
parent | HOOK_WORLD_STARTED now gets called when the CreateAndInitializeWorld function is used. (diff) | |
download | cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.gz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.bz2 cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.lz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.xz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.zst cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.zip |
Diffstat (limited to 'src/Bindings/PluginLua.cpp')
-rw-r--r-- | src/Bindings/PluginLua.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp index d714f2112..f27cee76e 100644 --- a/src/Bindings/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -1143,6 +1143,21 @@ bool cPluginLua::OnWeatherChanging(cWorld & a_World, eWeather & a_NewWeather) +bool cPluginLua::OnWorldStarted(cWorld & a_World) +{ + cCSLock Lock(m_CriticalSection); + cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_WORLD_STARTED]; + for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) + { + m_LuaState.Call((int)(**itr), &a_World); + } + return false; +} + + + + + bool cPluginLua::OnWorldTick(cWorld & a_World, float a_Dt, int a_LastTickDurationMSec) { cCSLock Lock(m_CriticalSection); |