mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix extended blocks destruction particles spawn spread, offset
This commit is contained in:
parent
a8f2de967f
commit
6cae75e02f
1 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,11 @@
|
|||
function on_block_broken(id, x, y, z, playerid)
|
||||
if gfx then
|
||||
gfx.particles.emit({x+0.5, y+0.5, z+0.5}, 64, {
|
||||
local size = {block.get_size(id)}
|
||||
gfx.particles.emit({
|
||||
x + size[1] * 0.5,
|
||||
y + size[1] * 0.5,
|
||||
z + size[1] * 0.5
|
||||
}, 64, {
|
||||
lifetime=1.0,
|
||||
spawn_interval=0.0001,
|
||||
explosion={4, 4, 4},
|
||||
|
|
@ -8,7 +13,7 @@ function on_block_broken(id, x, y, z, playerid)
|
|||
random_sub_uv=0.1,
|
||||
size={0.1, 0.1, 0.1},
|
||||
spawn_shape="box",
|
||||
spawn_spread={0.4, 0.4, 0.4}
|
||||
spawn_spread=vec3.mul(size, 0.4)
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue