Skip to content

Commit b9a9a20

Browse files
authored
Speaker Portraits: Fix overlapping portraits when characters have a custom theme (#2464)
By switching to a new speaker before changing the style, I solved the issue of overlapping portraits. This way, when changing the style, the object calling change_speaker is already the next speaker.
1 parent 40bce7f commit b9a9a20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/dialogic/Modules/Text/event_text.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func _execute() -> void:
6464

6565
var character_name_text := dialogic.Text.get_character_name_parsed(character)
6666
if character:
67+
dialogic.current_state_info['speaker'] = character.resource_path
6768
if dialogic.has_subsystem('Styles') and character.custom_info.get('style', null):
6869
dialogic.Styles.change_style(character.custom_info.style, false)
6970
await dialogic.get_tree().process_frame

0 commit comments

Comments
 (0)