From c57f383a3ab945782743fdf498088b7fca39d13c Mon Sep 17 00:00:00 2001 From: crabman77 Date: Fri, 25 Sep 2015 17:49:47 +0200 Subject: [PATCH] improve and fix crash --- mods/throwing/functions.lua | 1 + mods/throwing/spears.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/throwing/functions.lua b/mods/throwing/functions.lua index 327165a1..7596941c 100755 --- a/mods/throwing/functions.lua +++ b/mods/throwing/functions.lua @@ -102,6 +102,7 @@ function throwing_reload (itemstack, player, pos, is_cross, loaded) end local meta = arrow[2] player:set_wielded_item({name=loaded, wear=wear, metadata=meta}) + break end end end diff --git a/mods/throwing/spears.lua b/mods/throwing/spears.lua index 3f3e3f6c..591fcc3a 100644 --- a/mods/throwing/spears.lua +++ b/mods/throwing/spears.lua @@ -47,7 +47,7 @@ function throwing_register_spear_standard (kind, desc, eq, toughness, craft) lastpos={}, collisionbox = {0,0,0,0,0,0}, player = "", - wear = "", + wear = 0, } THROWING_SPEAR_ENTITY.on_step = function(self, dtime)