entités
Valentin Stark 3 years ago
parent 74bfc0c163
commit 6343eca464
  1. 6
      world/World3d.gd

@ -116,13 +116,17 @@ func update_chunks():
for neighbour in neighbours: for neighbour in neighbours:
if( if(
neighbour.x >= c_x - chunk_amount * 0.5 neighbour.x >= c_x - chunk_amount * 0.5
and neighbour.x <= c_x + chunk_amount * 0.5 and neighbour.x <= c_x + chunk_amount * 0.53
and neighbour.y >= c_z - chunk_amount * 0.5 and neighbour.y >= c_z - chunk_amount * 0.5
and neighbour.y <= c_z + chunk_amount * 0.53 and neighbour.y <= c_z + chunk_amount * 0.53
and not neighbour in used and not neighbour in used
): ):
stack.append(neighbour) stack.append(neighbour)
func clean_up_chunks(): func clean_up_chunks():
for key in chunks: for key in chunks:
var chunk = chunks[key] var chunk = chunks[key]

Loading…
Cancel
Save