forked from mtcontrib/throwing
1.0rc2, fixed nil value comparison
This commit is contained in:
@ -56,7 +56,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
}, nil)
|
||||
self.object:remove()
|
||||
local toughness = 0.9
|
||||
if self.breaks < toughness then
|
||||
if math.random() < toughness then
|
||||
minetest.add_item(self.lastpos, 'throwing:arrow_dig')
|
||||
else
|
||||
minetest.add_item(self.lastpos, 'default:stick')
|
||||
@ -73,7 +73,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
minetest.dig_node(pos)
|
||||
end
|
||||
local toughness = 0.65
|
||||
if self.breaks < toughness then
|
||||
if math.random() < toughness then
|
||||
minetest.add_item(self.lastpos, 'default:pick_steel')
|
||||
else
|
||||
minetest.add_item(self.lastpos, 'default:stick')
|
||||
|
Reference in New Issue
Block a user