Removed prints
parent
9c2510e530
commit
f8ed29f849
|
@ -86,9 +86,9 @@ func _ready():
|
||||||
else:
|
else:
|
||||||
min_distance = 0
|
min_distance = 0
|
||||||
|
|
||||||
|
if debug:
|
||||||
print("Clips: ", len(clips))
|
print("Clips: ", len(clips))
|
||||||
print("min_distance: ", min_distance)
|
print("min_distance: ", min_distance)
|
||||||
|
|
||||||
# prepare voices - TODO: this does not work! as aworkaround I've duplicated the secondary AudioStreamPlayer3D manually
|
# prepare voices - TODO: this does not work! as aworkaround I've duplicated the secondary AudioStreamPlayer3D manually
|
||||||
if Voice_Count > 1:
|
if Voice_Count > 1:
|
||||||
|
@ -149,8 +149,8 @@ func pick_random():
|
||||||
|
|
||||||
player.play()
|
player.play()
|
||||||
|
|
||||||
ready_to_play = false
|
#ready_to_play = false
|
||||||
await get_tree().create_timer(MinDelay)
|
#await get_tree().create_timer(MinDelay)
|
||||||
ready_to_play = true
|
ready_to_play = true
|
||||||
|
|
||||||
#$Timer.start(MinDelay)
|
#$Timer.start(MinDelay)
|
||||||
|
|
|
@ -225,8 +225,8 @@ func update_hud():
|
||||||
if old_name != new_info.name:
|
if old_name != new_info.name:
|
||||||
chat.chat_notification("Player [b]" + old_name + "[/b] changed name to [b]" + new_info.name + "[/b]")
|
chat.chat_notification("Player [b]" + old_name + "[/b] changed name to [b]" + new_info.name + "[/b]")
|
||||||
|
|
||||||
var player = $Players.get_node(str(pid))
|
if $Players.has_node(str(pid)):
|
||||||
if player:
|
var player = $Players.get_node(str(pid))
|
||||||
player.update_player(new_info)
|
player.update_player(new_info)
|
||||||
|
|
||||||
player_list.set(pid, new_info) # server relays other PID's data
|
player_list.set(pid, new_info) # server relays other PID's data
|
||||||
|
@ -242,7 +242,11 @@ func push_local_player_info(): #
|
||||||
@rpc(sync,auth,reliable) func destroy_player(pid: int):
|
@rpc(sync,auth,reliable) func destroy_player(pid: int):
|
||||||
var player_node = $Players.get_node(str(pid))
|
var player_node = $Players.get_node(str(pid))
|
||||||
|
|
||||||
|
|
||||||
|
if not player_node: # TODO find the reason for hitting the assert - thsi is a temporary workaround
|
||||||
|
return
|
||||||
assert(player_node != null, "Attempting to delete a player node that does not exist")
|
assert(player_node != null, "Attempting to delete a player node that does not exist")
|
||||||
|
|
||||||
player_node.name = str(player_node.name) + "_dead" # avoids name collision when instancing another player scene
|
player_node.name = str(player_node.name) + "_dead" # avoids name collision when instancing another player scene
|
||||||
player_node.queue_free()
|
player_node.queue_free()
|
||||||
|
|
||||||
|
|
Reference in New Issue