diff options
author | DTA7 <dta7e@t-online.de> | 2017-09-21 21:52:52 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-21 21:52:52 +0200 |
commit | 5a3b8e34b36a1f9b1f38f91483fc25d23b142f21 (patch) | |
tree | e7eaaa6524e6301aa53cde0bb33a35e3305cbaa0 /src/script/lua_api | |
parent | 67f97f8d3274e0e96a8f541a05a39f81dfec1a20 (diff) | |
download | minetest-5a3b8e34b36a1f9b1f38f91483fc25d23b142f21.tar.gz minetest-5a3b8e34b36a1f9b1f38f91483fc25d23b142f21.tar.bz2 minetest-5a3b8e34b36a1f9b1f38f91483fc25d23b142f21.zip |
Set placer to nil instead of a non-functional one in item_OnPlace (#6449)
* Set placer to nil instead of a non-functional one
This requires nil checks in core.rotate_node and core.rotate_and_place.
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index f9498a9a7..ca8b6bf13 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -396,9 +396,8 @@ int ModApiEnvMod::l_place_node(lua_State *L) pointed.type = POINTEDTHING_NODE; pointed.node_abovesurface = pos; pointed.node_undersurface = pos + v3s16(0,-1,0); - // Place it with a NULL placer (appears in Lua as a non-functional - // ObjectRef) - bool success = scriptIfaceItem->item_OnPlace(item, NULL, pointed); + // Place it with a NULL placer (appears in Lua as nil) + bool success = scriptIfaceItem->item_OnPlace(item, nullptr, pointed); lua_pushboolean(L, success); return 1; } |