summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
diff options
context:
space:
mode:
authorDTA7 <dta7e@t-online.de>2017-09-21 21:52:52 +0200
committerSmallJoker <mk939@ymail.com>2018-06-03 17:31:59 +0200
commite8286e8894cf132eeda4bac9924e5fd8c74a7eb2 (patch)
tree08293b665aa8941da3442aa798097fb368e462a2 /src/script/lua_api/l_env.cpp
parentb8f473be21b932c0c0cdb9ae3bfb4243f262a763 (diff)
downloadminetest-e8286e8894cf132eeda4bac9924e5fd8c74a7eb2.tar.gz
minetest-e8286e8894cf132eeda4bac9924e5fd8c74a7eb2.tar.bz2
minetest-e8286e8894cf132eeda4bac9924e5fd8c74a7eb2.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/l_env.cpp')
-rw-r--r--src/script/lua_api/l_env.cpp5
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 393c4ed5f..46745facd 100644
--- a/src/script/lua_api/l_env.cpp
+++ b/src/script/lua_api/l_env.cpp
@@ -291,9 +291,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;
}