Add trace_node_ray_fat and use it for mining lasers

This function includes more nodes, so laser tunnels
aren't always only one node wide.
This commit is contained in:
ShadowNinja
2016-03-21 21:24:26 -04:00
committed by ShadowNinja
parent e501c4622b
commit 1475ee6e40
2 changed files with 80 additions and 1 deletions

View File

@ -71,7 +71,7 @@ local function laser_shoot(player, range, particle_texture, sound)
texture = particle_texture .. "^[transform" .. math.random(0, 7),
})
minetest.sound_play(sound, {pos = player_pos, max_hear_distance = range})
for pos in technic.trace_node_ray(start_pos, dir, range) do
for pos in technic.trace_node_ray_fat(start_pos, dir, range) do
if minetest.is_protected(pos, player_name) then
minetest.record_protection_violation(pos, player_name)
break