summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api/s_node.cpp')
-rw-r--r--src/script/cpp_api/s_node.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp
index 49a825cac..d0b0583c0 100644
--- a/src/script/cpp_api/s_node.cpp
+++ b/src/script/cpp_api/s_node.cpp
@@ -233,3 +233,20 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
scriptError("error: %s", lua_tostring(L, -1));
}
+void ScriptApiNode::node_falling_update(v3s16 p)
+{
+ SCRIPTAPI_PRECHECKHEADER
+ lua_getglobal(L, "nodeupdate");
+ push_v3s16(L, p);
+ if(lua_pcall(L, 1, 0, 0))
+ scriptError("error: %s", lua_tostring(L, -1));
+}
+
+void ScriptApiNode::node_falling_update_single(v3s16 p)
+{
+ SCRIPTAPI_PRECHECKHEADER
+ lua_getglobal(L, "nodeupdate_single");
+ push_v3s16(L, p);
+ if(lua_pcall(L, 1, 0, 0))
+ scriptError("error: %s", lua_tostring(L, -1));
+}