Skip to content

Commit

Permalink
Ensure portrait node is removed from tree immediately
Browse files Browse the repository at this point in the history
`queue_free()` only removes the node from the tree when it is freed. This
gives a problem in `change_speaker`, which assumes the first child of
the portrait container is the current speaker.
  • Loading branch information
vmedea committed Jun 5, 2023
1 parent 4a4f6b4 commit 51177b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/dialogic/Modules/Character/subsystem_portraits.gd
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ func _change_portrait_z_index(character_node:Node2D, z_index:int, update_zindex:


func _remove_portrait(character_node:Node2D) -> void:
character_node.get_parent().remove_child(character_node)
character_node.queue_free()


Expand Down

0 comments on commit 51177b6

Please sign in to comment.