1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-01-23 16:30:19 +01:00

Updated metatools

- Prevented crash when punching entity
This commit is contained in:
LeMagnesium 2015-04-07 20:56:02 +02:00
parent ca78720cc6
commit a93eed6950

View File

@ -36,6 +36,7 @@ minetest.register_craftitem("metatools:stick",{
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
local username = user:get_player_name() local username = user:get_player_name()
local nodepos = pointed_thing.under local nodepos = pointed_thing.under
if not nodepos or not minetest.get_node(nodepos) then return end
local nodename = minetest.get_node(nodepos).name local nodename = minetest.get_node(nodepos).name
local node = minetest.registered_nodes[nodename] local node = minetest.registered_nodes[nodename]
local meta = minetest.get_meta(nodepos) local meta = minetest.get_meta(nodepos)