diff options
author | sfan5 <sfan5@live.de> | 2021-10-25 20:30:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 20:30:27 +0200 |
commit | 660e63dbae5901f8178b39ab40e6f770b8d7a215 (patch) | |
tree | 6b17279e1583716684b9d97bb8d56c8e7b8655f4 /src/script/lua_api/l_env.cpp | |
parent | d4b89eb106220f43838b039b13a0e356d366c259 (diff) | |
download | minetest-660e63dbae5901f8178b39ab40e6f770b8d7a215.tar.gz minetest-660e63dbae5901f8178b39ab40e6f770b8d7a215.tar.bz2 minetest-660e63dbae5901f8178b39ab40e6f770b8d7a215.zip |
Fix item duplication if player dies during interact callback (alternative) (#11662)
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index 98f8861fa..2c709d31b 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -477,7 +477,7 @@ int ModApiEnvMod::l_place_node(lua_State *L) return 1; } // Create item to place - ItemStack item(ndef->get(n).name, 1, 0, idef); + Optional<ItemStack> item = ItemStack(ndef->get(n).name, 1, 0, idef); // Make pointed position PointedThing pointed; pointed.type = POINTEDTHING_NODE; |