fix ball spawner crash: when ball used but empty meta

This commit is contained in:
rnd1 2016-07-12 07:34:09 +02:00
parent 1e87defeee
commit d49f6ad867
2 changed files with 3 additions and 2 deletions

View File

@ -547,9 +547,10 @@ minetest.register_tool("basic_machines:ball_spell", {
local pos = user:getpos();pos.y=pos.y+1;
local meta = minetest.deserialize(itemstack:get_metadata());
if not meta then return end
local owner = meta["owner"] or "";
if minetest.is_protected(pos,owner) then return end
--if minetest.is_protected(pos,owner) then return end
local t0 = spelltime[owner] or 0;
local t1 = minetest.get_gametime();

View File

@ -11,7 +11,7 @@ local machines_minstep = 1 -- minimal allowed activation timestep, if faster mac
local max_range = 10; -- machines normal range of operation
local machines_operations = 10; -- 1 coal will provide 10 mover basic operations ( moving dirt 1 block distance)
local machines_TTL = 16; -- time to live for signals, how many hops before signal dissipates
basic_machines.version = "07/09/2016a";
basic_machines.version = "07/12/2016a";
basic_machines.clockgen = 1; -- if 0 all background continuously running activity (clockgen/keypad) repeating is disabled
-- how hard it is to move blocks, default factor 1, note fuel cost is this multiplied by distance and divided by machine_operations..