forked from mtcontrib/throwing
Remplace la torche normale par la version murale quand lancée avec un arc
This commit is contained in:
parent
61567b3985
commit
1e9e758295
@ -76,7 +76,11 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
|||||||
if not string.find(node.name, "water") and not string.find(node.name, "lava") and not string.find(node.name, "torch") then
|
if not string.find(node.name, "water") and not string.find(node.name, "lava") and not string.find(node.name, "torch") then
|
||||||
local dir=vector.direction(self.lastpos, pos)
|
local dir=vector.direction(self.lastpos, pos)
|
||||||
local wall=minetest.dir_to_wallmounted(dir)
|
local wall=minetest.dir_to_wallmounted(dir)
|
||||||
minetest.add_node(self.lastpos, {name="default:torch", param2 = wall})
|
if wall ~= 1 and wall ~= 0 then
|
||||||
|
minetest.add_node(self.lastpos, {name="default:torch_wall", param2 = wall})
|
||||||
|
else
|
||||||
|
minetest.add_node(self.lastpos, {name="default:torch", param2 = wall})
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local toughness = 0.9
|
local toughness = 0.9
|
||||||
if math.random() < toughness then
|
if math.random() < toughness then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user