From 7c429e21a41c6da9b25812aec076acb4d171aed8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 14 Feb 2020 20:26:55 +0100 Subject: [PATCH] Fixed the remaining errors during generation, and disabled the cubic mesher for now. Also updated voxelman. --- HEADS | 2 +- game/scripts/dungeon_start_rooms/start_room.gd | 4 ++-- game/voxelman/world/TVVoxelChunk.gd | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HEADS b/HEADS index a091401d..5000065a 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "8a0f94a688f18a9565a21657bf44791550aec96a", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "09372b146936fda509f5c23a522e998d12f38e13"}, "entity_spell_system": {"master": "0bdf71c431b62b24d56c1fc178dbcb792e5dca3d"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "a457ed400c3980b40fe800ea43fdb7a0870079a2"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "00f6c128bd0e9799b7f7f86e118ed68277fbe27d"}, "fast_quadratic_mesh_simplifier": {"master": "655be02357fb4fd9d8d1b537758c1599fb37bb15"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "prop_tool": {"master": "df438053ebc900966f8f842fc65f0264f1271d49"}} \ No newline at end of file +{"engine": {"3.2": "8a0f94a688f18a9565a21657bf44791550aec96a", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "09372b146936fda509f5c23a522e998d12f38e13"}, "entity_spell_system": {"master": "0bdf71c431b62b24d56c1fc178dbcb792e5dca3d"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "07afd06c2a805bf994fa756f44328527de08e217"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "00f6c128bd0e9799b7f7f86e118ed68277fbe27d"}, "fast_quadratic_mesh_simplifier": {"master": "655be02357fb4fd9d8d1b537758c1599fb37bb15"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "prop_tool": {"master": "df438053ebc900966f8f842fc65f0264f1271d49"}} \ No newline at end of file diff --git a/game/scripts/dungeon_start_rooms/start_room.gd b/game/scripts/dungeon_start_rooms/start_room.gd index e09fdf99..bd0b3bdf 100644 --- a/game/scripts/dungeon_start_rooms/start_room.gd +++ b/game/scripts/dungeon_start_rooms/start_room.gd @@ -65,7 +65,7 @@ func _generate_chunk(chunk : VoxelChunk, spawn_mobs: bool) -> void: # chunk.set_voxel(100, hs + x, y + 1, hs + z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL) # break - for y in range(chunk.data_size_y): + for y in range(-chunk.get_margin_start(), chunk.size_y + chunk.get_margin_end()): for x in range(0, 2): for z in range(0, 2): chunk.set_voxel(0, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) @@ -81,7 +81,7 @@ func _generate_chunk(chunk : VoxelChunk, spawn_mobs: bool) -> void: chunk.set_voxel(4, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE) chunk.set_voxel(255, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL) - for y in range(chunk.get_size_y() - sizey + 1, chunk.data_size_y): + for y in range(chunk.get_size_y() - sizey + 1, chunk.size_y + chunk.get_margin_end()): for x in range(0, 2): for z in range(0, 2): chunk.set_voxel(0, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) diff --git a/game/voxelman/world/TVVoxelChunk.gd b/game/voxelman/world/TVVoxelChunk.gd index 5f426f7a..16eae973 100644 --- a/game/voxelman/world/TVVoxelChunk.gd +++ b/game/voxelman/world/TVVoxelChunk.gd @@ -50,7 +50,7 @@ func _create_meshers(): mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034) add_mesher(mesher) - add_mesher(VoxelMesherCubic.new()) + #add_mesher(VoxelMesherCubic.new()) _prop_texture_packer = TexturePacker.new() _prop_texture_packer.max_atlas_size = 1024