summaryrefslogtreecommitdiffstats
path: root/source/PluginLua.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 09:28:22 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 09:28:22 +0200
commitdd030fa8920d8cf9c863d2ffdcd791edc1749172 (patch)
tree33daa2cddc50cf496b6714a48d781ff9403a68b6 /source/PluginLua.cpp
parentcChunk::SetBlock() now uses cChunk::FastSetBlock() for the common code path. (diff)
downloadcuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.gz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.bz2
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.lz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.xz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.zst
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.zip
Diffstat (limited to '')
-rw-r--r--source/PluginLua.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/PluginLua.cpp b/source/PluginLua.cpp
index 62911a31c..5ceae29f9 100644
--- a/source/PluginLua.cpp
+++ b/source/PluginLua.cpp
@@ -734,6 +734,17 @@ bool cPlugin_NewLua::OnWeatherChanging(cWorld & a_World, eWeather & a_NewWeather
+bool cPlugin_NewLua::OnWorldTick(cWorld & a_World, float a_Dt)
+{
+ cCSLock Lock(m_CriticalSection);
+ m_LuaState.Call(GetHookFnName(cPluginManager::HOOK_WORLD_TICK), &a_World, a_Dt);
+ return false;
+}
+
+
+
+
+
bool cPlugin_NewLua::HandleCommand(const AStringVector & a_Split, cPlayer * a_Player)
{
ASSERT(!a_Split.empty());
@@ -908,6 +919,7 @@ const char * cPlugin_NewLua::GetHookFnName(cPluginManager::PluginHook a_Hook)
case cPluginManager::HOOK_UPDATING_SIGN: return "OnUpdatingSign";
case cPluginManager::HOOK_WEATHER_CHANGED: return "OnWeatherChanged";
case cPluginManager::HOOK_WEATHER_CHANGING: return "OnWeatherChanging";
+ case cPluginManager::HOOK_WORLD_TICK: return "OnWorldTick";
default: return NULL;
} // switch (a_Hook)
}