diff --git a/game/voxelman/world/TVVoxelChunk.gd b/game/voxelman/world/TVVoxelChunk.gd index 0562001c..469cb7b3 100644 --- a/game/voxelman/world/TVVoxelChunk.gd +++ b/game/voxelman/world/TVVoxelChunk.gd @@ -1,3 +1,4 @@ +tool extends VoxelChunk class_name TVVoxelChunk diff --git a/game/voxelman/world/TVVoxelWorld.gd b/game/voxelman/world/TVVoxelWorld.gd index 86b666f3..74c8f20f 100644 --- a/game/voxelman/world/TVVoxelWorld.gd +++ b/game/voxelman/world/TVVoxelWorld.gd @@ -40,15 +40,16 @@ var _player_file_name : String var _player : Entity func _enter_tree(): -# for ch in get_children(): -# if ch is VoxelChunk: -# var c : VoxelChunk = ch as VoxelChunk -# -# c.set_voxel_world(self) -# c.set_library(library) -# c.set_size(c.size_x, c.size_y, c.size_z, c.margin_start, c.margin_end) -# add_chunk(c, c.position_x, c.position_y, c.position_z) -# c.build_deferred() + for ch in get_children(): + if ch is VoxelChunk: + var c : VoxelChunk = ch as VoxelChunk + + c.set_voxel_world(self) + c.set_library(library) + c.set_size(c.size_x, c.size_y, c.size_z, c.margin_start, c.margin_end) +# c.is_build_threaded = false + add_chunk(c, c.position_x, c.position_y, c.position_z) + c.build_deferred()