aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui <rui.minetest@gmail.com>2017-09-01 20:40:09 +0900
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-01 13:40:09 +0200
commitc0dac4d9284b61c5ff411cbd45786ed14c200f37 (patch)
treea7c4c6a260335d24b672720120698648149d63b4
parentbf403b923ab4a1e11447b3f81d54d5d0c1124f65 (diff)
downloadminetest-c0dac4d9284b61c5ff411cbd45786ed14c200f37.tar.gz
minetest-c0dac4d9284b61c5ff411cbd45786ed14c200f37.tar.bz2
minetest-c0dac4d9284b61c5ff411cbd45786ed14c200f37.zip
Remove nodeupdate completely (#6358)
-rw-r--r--doc/client_lua_api.md2
-rw-r--r--doc/lua_api.txt2
-rw-r--r--games/minimal/mods/experimental/init.lua2
-rw-r--r--src/script/cpp_api/s_node.cpp24
-rw-r--r--src/script/cpp_api/s_node.h2
5 files changed, 3 insertions, 29 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md
index 5be007c75..44c7c2787 100644
--- a/doc/client_lua_api.md
+++ b/doc/client_lua_api.md
@@ -628,7 +628,7 @@ Minetest namespace reference
reliable or verifyable. Compatible forks will have a different name and
version entirely. To check for the presence of engine features, test
whether the functions exported by the wanted features exist. For example:
- `if minetest.nodeupdate then ... end`.
+ `if minetest.check_for_falling then ... end`.
### Logging
* `minetest.debug(...)`
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 4c0b3db2a..13227260c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2313,7 +2313,7 @@ Strings that need to be translated can contain several escapes, preceded by `@`.
reliable or verifyable. Compatible forks will have a different name and
version entirely. To check for the presence of engine features, test
whether the functions exported by the wanted features exist. For example:
- `if minetest.nodeupdate then ... end`.
+ `if minetest.check_for_falling then ... end`.
### Logging
* `minetest.debug(...)`
diff --git a/games/minimal/mods/experimental/init.lua b/games/minimal/mods/experimental/init.lua
index ba7a89018..afa136777 100644
--- a/games/minimal/mods/experimental/init.lua
+++ b/games/minimal/mods/experimental/init.lua
@@ -135,7 +135,7 @@ minetest.register_on_punchnode(function(p, node)
if node.name == "experimental:tnt" then
minetest.remove_node(p)
minetest.add_entity(p, "experimental:tnt")
- nodeupdate(p)
+ minetest.check_for_falling(p)
end
end)
diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp
index 591e26975..c8f85317e 100644
--- a/src/script/cpp_api/s_node.cpp
+++ b/src/script/cpp_api/s_node.cpp
@@ -270,27 +270,3 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
PCALL_RES(lua_pcall(L, 4, 0, error_handler));
lua_pop(L, 1); // Pop error handler
}
-
-void ScriptApiNode::node_falling_update(v3s16 p)
-{
- SCRIPTAPI_PRECHECKHEADER
-
- int error_handler = PUSH_ERROR_HANDLER(L);
-
- lua_getglobal(L, "nodeupdate");
- push_v3s16(L, p);
- PCALL_RES(lua_pcall(L, 1, 0, error_handler));
- lua_pop(L, 1); // Pop error handler
-}
-
-void ScriptApiNode::node_falling_update_single(v3s16 p)
-{
- SCRIPTAPI_PRECHECKHEADER
-
- int error_handler = PUSH_ERROR_HANDLER(L);
-
- lua_getglobal(L, "nodeupdate_single");
- push_v3s16(L, p);
- PCALL_RES(lua_pcall(L, 1, 0, error_handler));
- lua_pop(L, 1); // Pop error handler
-}
diff --git a/src/script/cpp_api/s_node.h b/src/script/cpp_api/s_node.h
index 5b6509c83..e7c0c01d1 100644
--- a/src/script/cpp_api/s_node.h
+++ b/src/script/cpp_api/s_node.h
@@ -48,8 +48,6 @@ public:
const std::string &formname,
const StringMap &fields,
ServerActiveObject *sender);
- void node_falling_update(v3s16 p);
- void node_falling_update_single(v3s16 p);
public:
static struct EnumString es_DrawType[];
static struct EnumString es_ContentParamType[];