From cfa59048ab7d7bb2e2e2d459ab6433137535e707 Mon Sep 17 00:00:00 2001 From: Brandon Date: Mon, 26 May 2014 17:20:07 -0500 Subject: [PATCH] Fix shoot_timer nil value crash --- mods/throwing/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/throwing/init.lua b/mods/throwing/init.lua index 497f7a1..72c21f1 100644 --- a/mods/throwing/init.lua +++ b/mods/throwing/init.lua @@ -101,8 +101,8 @@ minetest.register_craft({ minetest.register_globalstep(function (dtime) for _,player in ipairs(minetest.get_connected_players()) do + local name = player:get_player_name() if shoot_timer[name] ~= nil then - local name = player:get_player_name() shoot_timer[name] = shoot_timer[name] - dtime else shoot_timer[name] = 0