Few small fixes/cleanups. Also updated heads to get an uninitialized variable fix from ESS. This fixed player spawning issues.

This commit is contained in:
Relintai 2020-03-12 13:50:14 +01:00
parent c00ae9b9bb
commit ae0d64a069
6 changed files with 17 additions and 16 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "34dc32aeb8b06947897f75399c15f3eb9c211d7b", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "b66de0a8946d17913bd7f3877e2f77b7ef08c3b8"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "91540092500d8b8bd0c12322e46f4e10a00c66ae"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "9b1868668de4242ccc0565cf3c6b5e1c375f1576"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "3144600da9dd00595518c5f0d4cc2cc400825c86"}}
{"engine": {"3.2": "34dc32aeb8b06947897f75399c15f3eb9c211d7b", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "bff7b220c40216f625a028af144b174620106c59"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "91540092500d8b8bd0c12322e46f4e10a00c66ae"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "9b1868668de4242ccc0565cf3c6b5e1c375f1576"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "0007d4793ef76b1998586018b66382b0fc8a9c99"}}

View File

@ -103,9 +103,10 @@ func load_player(file_name : String, position : Vector3, network_owner : int) ->
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_PLAYER
createinfo.serialized_data = load_file(file_name)
createinfo.transform.origin = position
createinfo.networked = false
Logger.info("Player spawned ")
EntityDataManager.request_entity_spawn(createinfo)
return createinfo.created_entity
func spawn_player_for_menu(class_id : int, name : String, parent : Node) -> Entity:

View File

@ -157,6 +157,6 @@ func character_selection_changed() -> void:
return
for e in player_display_container_node.get_children():
e.hide()
e.get_body().hide()
b.entity.show()

View File

@ -254,7 +254,7 @@ func _build_phase(phase):
# var fqms : FastQuadraticMeshSimplifier = FastQuadraticMeshSimplifier.new()
# fqms.initialize(arr)
# fqms.simplify_mesh(0.5)
# fqms.enable_smart_link = false
# fqms.enable_smart_link = true
# fqms.preserve_border_dges = true
# fqms.preserve_uv_seam_edges = true
# var arr2 = fqms.get_arrays()
@ -263,12 +263,12 @@ func _build_phase(phase):
## print(arr[VisualServer.ARRAY_VERTEX].size())
## print(arr2[VisualServer.ARRAY_VERTEX].size())
#
# var imgeom : ImmediateGeometry = get_child(0) as ImmediateGeometry
# imgeom.begin(Mesh.PRIMITIVE_POINTS)
# var vs = arr2[VisualServer.ARRAY_VERTEX]
# for v in vs:
# imgeom.add_vertex(v)
# imgeom.end()
## var imgeom : ImmediateGeometry = get_child(0) as ImmediateGeometry
## imgeom.begin(Mesh.PRIMITIVE_POINTS)
## var vs = arr2[VisualServer.ARRAY_VERTEX]
## for v in vs:
## imgeom.add_vertex(v)
## imgeom.end()
#
#
# VisualServer.mesh_add_surface_from_arrays(get_mesh_rid(), VisualServer.PRIMITIVE_TRIANGLES, arr2)

View File

@ -224,11 +224,11 @@ func n_add_chunk(b : Node) -> void:
var surface1 : VoxelSurface = library.get_voxel_surface(type_id1)
var surface2 : VoxelSurface = library.get_voxel_surface(type_id2)
if type_id1 == 0:
print(type_id1)
if type_id2 == 0:
print("asd" + str(type_id2))
# if type_id1 == 0:
# print(type_id1)
#
# if type_id2 == 0:
# print("asd" + str(type_id2))
for i in range(vertex_count):
var fv : int = get_regular_vertex_data_first_vertex(case_code, i)

View File

@ -244,7 +244,7 @@ func load_character(file_name : String) -> void:
_player = Entities.load_player(file_name, Vector3(5, 30, 5), 1) as Entity
#TODO hack, do this properly
_player.set_physics_process(false)
Server.sset_seed(_player.sseed)
if level_generator != null: