Update Voxelman to the latest to grab the improvements.

This commit is contained in:
Relintai 2020-03-06 21:32:52 +01:00
parent 9cab73125e
commit ce8290329b
2 changed files with 17 additions and 10 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "0d5e483a90c41c433056b8cf6e4e8def6316690f", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "3e10779dbc5258d1e1b08eab287189f9c1ccec64"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "b9f1de7dd9c3d0cc7e6af3ad1fcec5d425e20f2b"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "ba464ef04500aa01b2638cf1f890f3f6582ead84"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}}
{"engine": {"3.2": "8eb193d86e81dfc9347877155826d4494952bca6", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "3e10779dbc5258d1e1b08eab287189f9c1ccec64"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "29b77a3a6d05fb14e15b0dac4d43e70a01812853"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "9b1868668de4242ccc0565cf3c6b5e1c375f1576"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}}

View File

@ -202,13 +202,15 @@ func get_prop_mesh_transform(base_transform : Transform, snap_to_mesh: bool, sna
return base_transform
func _build_phase(phase):
# print(name + " " + str(phase))
if phase == VoxelChunk.BUILD_PHASE_LIGHTS:
clear_baked_lights()
generate_random_ao()
bake_lights()
set_physics_process_internal(true)
return false
#set_physics_process_internal(true)
active_build_phase_type = VoxelChunk.BUILD_PHASE_TYPE_PHYSICS_PROCESS
return
# elif phase == VoxelChunk.BUILD_PHASE_TERRARIN_MESH:
# for i in range(get_mesher_count()):
# var mesher : VoxelMesher = get_mesher(i)
@ -249,14 +251,15 @@ func _build_phase(phase):
#
# return true;
elif phase == VoxelChunk.BUILD_PHASE_PROP_MESH:
set_physics_process_internal(true)
return false
# set_physics_process_internal(true)
active_build_phase_type = VoxelChunk.BUILD_PHASE_TYPE_PHYSICS_PROCESS
return
elif phase == VoxelChunk.BUILD_PHASE_FINALIZE:
_notification(NOTIFICATION_TRANSFORM_CHANGED)
return ._build_phase(phase)
._build_phase(phase)
else:
return ._build_phase(phase)
._build_phase(phase)
func _prop_added(prop):
pass
@ -283,16 +286,20 @@ func generate_random_ao() -> void:
set_voxel(int(val * 255.0), x, y, z, VoxelChunk.DEFAULT_CHANNEL_RANDOM_AO)
func _physics_process(delta):
func _build_phase_physics_process(phase):
if current_build_phase == VoxelChunk.BUILD_PHASE_LIGHTS:
build_phase_lights()
set_physics_process_internal(false)
# set_physics_process_internal(false)
active_build_phase_type = VoxelChunk.BUILD_PHASE_TYPE_NORMAL
next_phase()
elif current_build_phase == VoxelChunk.BUILD_PHASE_PROP_MESH:
build_phase_prop_mesh()
set_physics_process_internal(false)
# set_physics_process_internal(false)
active_build_phase_type = VoxelChunk.BUILD_PHASE_TYPE_NORMAL
next_phase()
else:
._build_phase_physics_process(phase)
func visibility_changed() -> void:
if get_mesh_instance_rid() != RID():