diff options
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 6 | ||||
-rw-r--r-- | src/script/lua_api/l_env.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index 642101166..45d444d55 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -109,7 +109,8 @@ void LuaABM::trigger(ServerEnvironment *env, v3s16 p, MapNode n, lua_pop(L, 1); // Pop error handler } -void LuaLBM::trigger(ServerEnvironment *env, v3s16 p, MapNode n) +void LuaLBM::trigger(ServerEnvironment *env, v3s16 p, + const MapNode n, const float dtime_s) { ServerScripting *scriptIface = env->getScriptIface(); scriptIface->realityCheck(); @@ -141,8 +142,9 @@ void LuaLBM::trigger(ServerEnvironment *env, v3s16 p, MapNode n) lua_remove(L, -2); // Remove registered_lbms[m_id] push_v3s16(L, p); pushnode(L, n); + lua_pushnumber(L, dtime_s); - int result = lua_pcall(L, 2, 0, error_handler); + int result = lua_pcall(L, 3, 0, error_handler); if (result) scriptIface->scriptError(result, "LuaLBM::trigger"); diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index 3b386f86a..08782a4fb 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -287,7 +287,7 @@ public: this->trigger_contents = trigger_contents; this->name = name; } - virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n); + virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n, float dtime_s); }; //! Lua wrapper for RaycastState objects |