From 306f193db629cda7225d01416008cbc1fff98ba7 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 5 May 2015 09:29:04 +0100 Subject: [PATCH] Stop dropped armor disappearing into ground This stops dropped armor disappearing into ground at times... --- 3d_armor/armor.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 130e563..20a5017 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -526,15 +526,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then armor.drop_armor = function(pos, stack) local obj = minetest.add_item(pos, stack) if obj then - local x = math.random(1, 5) - if math.random(1,2) == 1 then - x = -x - end - local z = math.random(1, 5) - if math.random(1,2) == 1 then - z = -z - end - obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z}) + obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) end end minetest.register_on_dieplayer(function(player)