Skip to content

Commit

Permalink
Speaker Portraits: Fix overlapping portraits when characters have a c…
Browse files Browse the repository at this point in the history
…ustom theme (dialogic-godot#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.
  • Loading branch information
ssw940521 authored Nov 13, 2024
1 parent 40bce7f commit b9a9a20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/dialogic/Modules/Text/event_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func _execute() -> void:

var character_name_text := dialogic.Text.get_character_name_parsed(character)
if character:
dialogic.current_state_info['speaker'] = character.resource_path
if dialogic.has_subsystem('Styles') and character.custom_info.get('style', null):
dialogic.Styles.change_style(character.custom_info.style, false)
await dialogic.get_tree().process_frame
Expand Down

0 comments on commit b9a9a20

Please sign in to comment.