Merge branch 'dev' into pathfinding

This commit is contained in:
MihailRis
2025-08-24 17:32:13 +03:00
9 changed files with 73 additions and 24 deletions
+7 -2
View File
@@ -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
+1 -1
View File
@@ -71,7 +71,7 @@ local function insert(self, index, b)
if self.size + elems > self.capacity then
grow_buffer(self, elems)
end
for i=self.size, index - 1, -1 do
for i = self.size - 1, index - 1, -1 do
self.bytes[i + elems] = self.bytes[i]
end
if _type(b) == "number" then